pat2vec.util.logger_setup

Functions

setup_logger([log_level, logs_dir])

Sets up a logger that writes to a file and the console.

pat2vec.util.logger_setup.setup_logger(log_level='INFO', logs_dir='logs')[source]

Sets up a logger that writes to a file and the console.

This function configures a logger with two handlers:

  1. A file handler that saves DEBUG level logs to a timestamped file in a specified logs directory.

  2. A stream handler that prints INFO level logs to the console.

Return type:

Logger

Returns:

The configured logger instance.

Parameters:
  • log_level (str)

  • logs_dir (str)