icecube.icetray.i3logging module

class icecube.icetray.i3logging.ColorFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)

Bases: Formatter

format(record)

Format the specified record as text.

The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.

class icecube.icetray.i3logging.LoggingBridge

Bases: I3Logger

getLogger(unit)
get_level_for_unit((I3Logger)arg1, (str)arg2) I3LogLevel :
C++ signature :

I3LogLevel get_level_for_unit(I3Logger {lvalue},std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>)

i3levels = {5: icecube._icetray.I3LogLevel.LOG_TRACE, 10: icecube._icetray.I3LogLevel.LOG_DEBUG, 20: icecube._icetray.I3LogLevel.LOG_INFO, 25: icecube._icetray.I3LogLevel.LOG_NOTICE, 30: icecube._icetray.I3LogLevel.LOG_WARN, 40: icecube._icetray.I3LogLevel.LOG_ERROR, 50: icecube._icetray.I3LogLevel.LOG_FATAL}
log((I3Logger)arg1, (I3LogLevel)arg2, (str)arg3, (str)arg4, (int)arg5, (str)arg6, (str)arg7) None :
C++ signature :

void log(I3Logger {lvalue},I3LogLevel,std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>,std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>,int,std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>,std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>)

pylevels = {icecube._icetray.I3LogLevel.LOG_TRACE: 5, icecube._icetray.I3LogLevel.LOG_DEBUG: 10, icecube._icetray.I3LogLevel.LOG_INFO: 20, icecube._icetray.I3LogLevel.LOG_NOTICE: 25, icecube._icetray.I3LogLevel.LOG_WARN: 30, icecube._icetray.I3LogLevel.LOG_ERROR: 40, icecube._icetray.I3LogLevel.LOG_FATAL: 50}
set_level((I3Logger)arg1, (I3LogLevel)arg2) None :
C++ signature :

void set_level(I3Logger {lvalue},I3LogLevel)

set_level_for_unit((I3Logger)arg1, (str)arg2, (I3LogLevel)arg3) None :
C++ signature :

void set_level_for_unit(I3Logger {lvalue},std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>,I3LogLevel)

icecube.icetray.i3logging.console(colors=True)
icecube.icetray.i3logging.log_debug(message, unit='Python')
icecube.icetray.i3logging.log_error(message, unit='Python')
icecube.icetray.i3logging.log_fatal(message, unit='Python')
icecube.icetray.i3logging.log_info(message, unit='Python')
icecube.icetray.i3logging.log_notice(message, unit='Python')
icecube.icetray.i3logging.log_trace(message, unit='Python')
icecube.icetray.i3logging.log_warn(message, unit='Python')
icecube.icetray.i3logging.rotating_files(filename, maxBytes=0, backupCount=0)
icecube.icetray.i3logging.set_level(level)

Set the global logging level.

Parameters:

level – the log level. This may also be specified as a string.

Examples::

icetray.logging.set_level(icetray.logging.I3LogLevel.LOG_INFO) icetray.logging.set_level(‘INFO’)

icecube.icetray.i3logging.set_level_for_unit(unit, level)

Set the logging level for a specific logging unit.

Parameters:

level – the log level. This may also be specified as a string.

Examples::

icetray.logging.set_level_for_unit(‘I3Reader’, icetray.logging.I3LogLevel.LOG_TRACE) icetray.logging.set_level(‘I3Reader’, ‘TRACE’)

icecube.icetray.i3logging.syslog()