km3pipe.logger
¶
The logging facility.
Module Contents¶
Classes¶
Read/write logging information. |
Functions¶
|
Show a deprecation warning. |
|
Show a message only once, determined by position in source or identifer. |
|
Helper function to get a logger |
Return a list of avialable logger names |
|
|
Set the log level for given logger and all handlers |
|
Return a function which prints a message with a coloured name prefix |
|
Return a ANSI coloured text based on its hash |
|
Return the ANSI hash colour prefix and suffix for a given text |
Attributes¶
- km3pipe.logger.once(self, message, *args, **kws)[source]¶
Show a message only once, determined by position in source or identifer.
This will not work in IPython or Jupyter notebooks if no identifier is specified, since then the determined position in source contains the execution number of the input (cell), which changes every time. Set a unique
identifier=X
, otherwise the message will be printed every time.
- class km3pipe.logger.LogIO(node, stream, url='pi2089.physik.uni-erlangen.de', port=28777)[source]¶
Read/write logging information.
- km3pipe.logger.get_logger(name, filename=None, stream_loglevel='INFO', file_loglevel='DEBUG')[source]¶
Helper function to get a logger
- km3pipe.logger.set_level(log_or_name, level)[source]¶
Set the log level for given logger and all handlers