custom_logger
custom_logger ¶
This module contains the fuction default custom logger
that can be used to create a logger with a specified name, level, and format.
default_custom_logger ¶
default_custom_logger(
name: str, level: int | None = logging.DEBUG, log_format: str | None = None
) -> logging.Logger
Create a logger with a specified name, level, and format.
Parameters:
-
name
(str
) –The name of the logger.
-
level
(int | None
, default:logging.DEBUG
) –Logging level.
-
log_format
(str | None
, default:None
) –The format of the log messages. If
None
, the default format is%(asctime)s | %(name)s | %(module)s | %(levelname)s | %(message)s
.
Returns:
-
logger
(logging.Logger
) –A logger object with the specified name, logging level, and format.