nalp.utils.logging¶
Logging-based methods and helpers.
- nalp.utils.logging.FORMATTER¶
- nalp.utils.logging.LOG_FILE = nalp.log¶
- nalp.utils.logging.LOG_LEVEL¶
- class nalp.utils.logging.Logger(name, level=NOTSET)¶
A customized Logger file that enables the possibility of only logging to file.
- to_file(self, msg: str, *args, **kwargs)¶
Logs the message only to the logging file.
- Parameters
msg – Message to be logged.
- nalp.utils.logging.get_console_handler()¶
Gets a console handler to handle logging into console.
- Returns
Handler to output information into console.
- Return type
(StreamHandler)
- nalp.utils.logging.get_logger(logger_name: str)¶
Gets a logger and make it avaliable for further use.
- Parameters
logger_name – The name of the logger.
- Returns
Logger instance.
- Return type
(Logger)
- nalp.utils.logging.get_timed_file_handler()¶
Gets a timed file handler to handle logging into files.
- Returns
Handler to output information into timed files.
- Return type
(TimedRotatingFileHandler)