DynAIkonTrap.logging#
Provides access to a preset Python logger. To use call get_logger() once at the start of the file with the parameter set to __name__. Doing so ensures the logging output displays which module a log message was generated in.
Example usage:
logger = get_logger(__name__)
logger.error('A dreadful thing is happening')
Functions
|
Creates a |
- get_logger(name: str) Logger#
Creates a
logging.Loggerinstance with messages set to print the path according toname. The function should always be called with__name__- Parameters
name (str) – file path as given by
__name__- Returns
A
Loggerinstance. Call the standard info, warning, error, etc. functions to generate- Return type
Logger