pysepal.logger.logger.setup_logging#

pysepal.logger.logger.setup_logging(logger_name, config_path=None)[source]#

Set up logging configuration from a TOML file and return the configured logger.

Parameters:
  • logger_name (str) – Name of the logger to configure and return.

  • config_path (str | Path | None) – Path to the logging configuration file. Defaults to “logging_config.toml” in the caller’s directory.

Returns:

The configured logger instance.

Return type:

Logger

If the configuration file does not exist, a NullHandler is added to the specified logger. If the file exists, it is loaded and the logging configuration is applied.