Logger class
It logs into the console and in the log file
Attributes
level: Literal
Functions
Create the Gencovery logger, it logs into the console and into a file
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
log_dir | str | ||
level | Literal | INFO | Level of the logs to show, defaults to "info" error | info | debug, optional |
scenario_id | str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
log_level | str |
Return type:
Literal |
Clear the logger
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'
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
date | datetime | Date to convert |
Return type:
str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
message | str |
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'
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
file_name | str | File name to convert |
Return type:
datetime |
Return type:
str |
Return type:
str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
exception | Exception |
If call the sql queries will be printed in the console
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
message | str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
message | str |