releso.util.logger.set_up_logger

releso.util.logger.set_up_logger(logger_name: str = '', log_file_location: Path = PosixPath('.'), verbosity: VerbosityLevel = VerbosityLevel.INFO, console_logging: bool = False, logger: Logger | None = None) Logger

Create a logger instance with a specified name.

Author:

Daniel Wolff (wolff@cats.rwth-aachen.de), Clemens Fricke (clemens.david.fricke@tuwien.ac.at)

Parameters:
  • logger_name (str, optional) – Name of the logging instance. Defaults to ‘’.

  • log_file_location (Path) – Path to the directory into which the log file(s) will be placed into. Defaults to “.”.

  • verbosity (VerbosityLevel) – Enum value for the verbosity of the given logger. Defaults to VerbosityLevel.INFO

  • console_logging (bool) – Toggle whether to also log into the console. Defaults to False.

  • logger (Optional[logging.Logger]) – Will add handles defined in this function to the given logger. Instead of creating a new logger instance. Defaults to None.

Returns:

Configured logger instance for simultaneously writing to file and console

Return type:

logging.Logger