gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

Logger

Logger class

It logs into the console and in the log file

Attributes
level: Literal
Functions
__init__

Create the Gencovery logger, it logs into the console and into a file

log_dir : str
directory where the logs are stored
level : Literal - INFO
level of the logs to show
context : LogContext - LogContext.MAIN
context of the logger
context_id : str
id of the context
clear
log_debug
message : str
log_error
message : str
log_exception
message : str
log_info
message : str
log_warning
message : str
build_main_logger @classmethod
log_dir : str
level : Literal - INFO
context : LogContext - LogContext.MAIN
context_id : str
Return type : Logger
check_log_level @classmethod
log_level : str
Return type : Literal
clear_logger @classmethod

Clear the logger

date_to_file_name @classmethod

Convert a date to a file name. If the date is the current date the file name is 'log' Otherwise the file name is in the format 'log.YYYY-MM-DD'

date : datetime
date to convert
Return type : str
debug @classmethod
message : str
error @classmethod
message : str
file_name_to_date @classmethod

Convert a file name to a date. If the file name is 'log' the current date is returned Otherwise file name must be in the format 'log.YYYY-MM-DD'

file_name : str
file name to convert
Return type : datetime
get_date @classmethod
Return type : str
get_file_path @classmethod
Return type : str
info @classmethod
message : str
log_exception_stack_trace @classmethod
exception : Exception
progress @classmethod
message : str
warning @classmethod
message : str