Extracted at 2014-06-26.
pike.ida.liu.se
[Top]
Tools
Tools.Logging

Method Tools.Logging.get_logger()


Method get_logger

Tools.Logging.Log.Logger get_logger(string|program loggername, int|void no_default_logger)

Description

get a logger for loggername

by default, this call will always return a logger object. if the requested logger is not found, the nearest parent logger will be returned, up to and including the default root logger.

Parameter loggername

may be a string, in which the logger is directly specified, or a program, in which case the logger name will be the lower-cased full name of the program (as determined by the %O parameter to sprintf() , with any "/" converted to ".".

Parameter no_default_logger

if specified, this flag will cause this call to return '0' if no logger with the requested name could be found.

Example

get_logger(Protocols.HTTP.client)

would request the logger named "protocols.http.client".

Note

loggers returned by this method are shared copies.