[sr-dev] method mask for xlog

Daniel-Constantin Mierla miconda at gmail.com
Thu Jul 15 10:49:29 CEST 2010



On 7/15/10 8:22 AM, Juha Heinanen wrote:
> i'm thinking to add method mask to xlog module.  when xlog() is called,
> nothing happens if method of request or reply is included in the mask.
> the mask could be set at run rime via an rpc command and would default
> to 0.
>
> using the mask, it would be easy, for example, to prevent logging of
> OPTIONS requests without a need to add if statements to the script.
>
> any comments?
>    
$rm should return method type as integer when used in integer 
operations. This together with a shared variable (e.g., $shv(x) -- they 
can be changed at runtime via mi/rpc) and bitwise 'and' can be used to 
achieve what you want in your config.

Introducing the check inside the module will make the 'if' to be 
executed for each xlog function. Personally I would prefer to avoid 
introducing in the code all kind of filtering conditions, especially if 
they are not very common.

Cheers,
Daniel


-- 
Daniel-Constantin Mierla
http://www.asipto.com/




More information about the sr-dev mailing list