km3pipe.logger
¶
The logging facility.
Module Contents¶
Classes¶
LogIO (node, stream, url=’pi2089.physik.uni-erlangen.de’, port=28777) |
Read/write logging information. |
Functions¶
deprecation (self, message, *args, **kws) |
Show a deprecation warning. |
once (self, message, *args, **kws) |
Show a message only once, determined by position in source or identifer. |
get_logger (name) |
Helper function to get a logger |
available_loggers () |
Return a list of avialable logger names |
set_level (name, level) |
Set the log level for given logger |
get_printer (name, color=None, ansi_code=None, force_color=False) |
Return a function which prints a message with a coloured name prefix |
hash_coloured (text) |
Return a ANSI coloured text based on its hash |
hash_coloured_escapes (text) |
Return the ANSI hash colour prefix and suffix for a given text |
-
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, otherwise the message will be printed every time.
-
km3pipe.logger.
deprecation
[source]
-
km3pipe.logger.
once
[source]
-
class
km3pipe.logger.
LogIO
(node, stream, url='pi2089.physik.uni-erlangen.de', port=28777)[source]¶ Bases:
object
Read/write logging information.