Log
This module provides a custom Logger class for logging messages with additional information.
The Logger class provides static methods for logging messages at different levels (INFO, DEBUG, WARNING, ERROR, CRITICAL). Each log message includes the current time, file name, function name, and line number.
Logger
¶
A custom Logger class for logging messages with additional information.
This Logger provides static methods for logging messages at different levels (INFO, DEBUG, WARNING, ERROR, CRITICAL). Each log message includes the current time, file name, function name, and line number.
CRITICAL
staticmethod
¶
Logs a critical message.
PARAMETER | DESCRIPTION |
---|---|
message
|
The message to log.
TYPE:
|
DEBUG
staticmethod
¶
Logs a debug message.
PARAMETER | DESCRIPTION |
---|---|
message
|
The message to log.
TYPE:
|
ERROR
staticmethod
¶
Logs an error message.
PARAMETER | DESCRIPTION |
---|---|
message
|
The message to log.
TYPE:
|
INFO
staticmethod
¶
Logs an informational message.
PARAMETER | DESCRIPTION |
---|---|
message
|
The message to log.
TYPE:
|
WARNING
staticmethod
¶
Logs a warning message.
Parameters: message (str): The message to log.
log
staticmethod
¶
Logs a message with the current time, file name, function name, and line number.
PARAMETER | DESCRIPTION |
---|---|
message
|
The message to log.
TYPE:
|
level
|
The logging level of the message (e.g., logging.INFO, logging.DEBUG).
TYPE:
|
Source code in AnilistMangaUpdater/Utils/log.py
manage_log_files
staticmethod
¶
Manages the number of log files in the logs directory.
PARAMETER | DESCRIPTION |
---|---|
max_logs
|
The maximum number of log files to keep.
TYPE:
|
Source code in AnilistMangaUpdater/Utils/log.py
setup
staticmethod
¶
Sets up the logger to print to both the terminal and a file.
PARAMETER | DESCRIPTION |
---|---|
max_logs
|
The maximum number of log files to keep.
TYPE:
|