json2graph.modules.logger

This module provides functions for configuring a logger that outputs messages to the console.

The logger can be customized based on different execution modes, allowing you to control the log level.

Module Contents

Functions

initialize_logger([execution_mode])

Create and initialize logger named 'execution-logger'.

json2graph.modules.logger.initialize_logger(execution_mode='script')

Create and initialize logger named ‘execution-logger’.

Different triggers are defined for each execution mode:
  • script: INFO

  • import: ERROR

  • test: ERROR

Parameters:

execution_mode (str) – Information about execution mode. Valid values are ‘script’, ‘import’ and ‘test’.

Returns:

Created logger called ‘execution-logger’.

Return type:

logging.Logger