HedLogger¶
- class HedLogger(name=None)[source]
Log status messages organized by key.
Methods
|
Constructor for the HED logger. |
|
Add an entry to this log. |
|
Get all the log entries stored under the key. |
Return a list of keys for this log. |
|
|
Return the log as a string, with entries separated by newlines. |
Attributes
- HedLogger.__init__(name=None)[source]¶
Constructor for the HED logger.
- Parameters:
name (str) – Identifying name of the logger.
- HedLogger.add(key, msg, level='', also_print=False)[source]¶
Add an entry to this log.
- Parameters:
key (str) – Key used to organize log messages.
msg (str) – Message to log.
level (str) – Level of importance for filtering messages.
also_print (bool) – If False (the default) nothing is output, otherwise the log entry output to stdout.
- HedLogger.get_log(key)[source]¶
Get all the log entries stored under the key.
- Parameters:
key (str) – The key whose log messages are retrieved.
- Returns:
List of log entries associated with this key.
- Return type:
list