configure_logging: Configure logging options

Description Usage Arguments Details See Also Examples

Description

Configure logging options

Usage

1
configure_logging(threshold_level = "DEBUG", output_file = "")

Arguments

threshold_level

Defines threshold level for printing logs. Should be one of 'DEBUG', 'INFO', 'WARNING' or 'ERROR'. Default to 'DEBUG'. It defines which logs should be printed. It prints logs which have level higher or equal to threshold_level. The hierarchy is 'DEBUG' < 'INFO' < 'WARNING' < 'ERROR'.

output_file

Either a path to a file or a connection. With default settings "" logs are printed to console.

Details

configure_logging sets global behaviour for logging and acts as a filter of how detailed logs should appear in the output.

See Also

create_logger

Examples

1
2
3
4
5
6
# set logging threshold level to INFO
configure_logging(threshold_level = 'INFO')

# set logging threshold level to WARNING and
# set writing all logs to 'log.log' file
configure_logging(threshold_level = 'WARNING', output_file = 'log.log')

delta1epsilon/logtime documentation built on May 15, 2019, 3:22 a.m.