cellpy.log#

Set up logger instance

Module Contents#

Functions#

setup_logging([default_level, default_json_path, ...])

Setup logging configuration.

setup_logging(default_level=None, default_json_path=None, env_key='LOG_CFG', custom_log_dir=None, reset_big_log=False, max_size=5000000, testing=False)[source]#

Setup logging configuration.

Parameters:
  • default_level – default log-level to screen (std.out).

  • default_json_path – path to config file for setting up logging.

  • env_key (str) – use this environment prm to try to get default_json_path.

  • custom_log_dir – path for saving logs.

  • reset_big_log (bool) – reset log if too big (max_size).

  • max_size (int) – if reset_log, this is the max limit.

  • testing (bool) – set as True if testing, and you don’t want to create any .log files