version: 1
disable_existing_loggers: False
loggers:
# standard logger
std:
# level: NOTSET
level: DEBUG
handlers:
- std_debug_console
- std_debug_file
- std_info_file
- std_warning_file
- std_error_file
- std_critical_file
handlers:
std_debug_console:
class: 'logging.StreamHandler'
level: DEBUG
formatter: std_debug
stream: 'ext://sys.stderr'
std_debug_file:
class: 'logging.FileHandler'
level: DEBUG
formatter: std_debug
filename: 'dir_run_debs/debs_ts_pid.log'
mode: 'a'
delay: true
std_info_file:
class: 'logging.FileHandler'
level: INFO
formatter: std_info
filename: 'dir_run_infs/infs_ts_pid.log'
mode: 'a'
delay: true
std_warning_file:
class: 'logging.FileHandler'
level: WARNING
formatter: std_warning
filename: 'dir_run_wrns/wrns_ts_pid.log'
mode: 'a'
delay: true
std_error_file:
class: 'logging.FileHandler'
level: ERROR
formatter: std_error
filename: 'dir_run_errs/errs_ts_pid.log'
mode: 'a'
delay: true
std_critical_file:
class: 'logging.FileHandler'
level: CRITICAL
formatter: std_critical
filename: 'dir_run_crts/crts_ts_pid.log'
mode: 'a'
delay: true
std_critical_mail:
class: 'logging.handlers.SMTPHandler'
level: CRITICAL
formatter: std_critical_mail
mailhost : localhost
fromaddr: 'monitoring@domain.com'
toaddrs:
- 'dev@domain.com'
- 'qa@domain.com'
subject: 'Critical error with application name'
formatters:
std_debug:
format: '%(asctime)-15s %(levelname)s-%(name)s-%(process)d::%(module)s.%(funcName)s|%(lineno)s:: %(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
std_info:
format: '%(asctime)-15s %(levelname)s-%(name)s-%(process)d::%(module)s.%(funcName)s|%(lineno)s:: %(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
std_warning:
format: '%(asctime)-15s %(levelname)s-%(name)s-%(process)d::%(module)s.%(funcName)s|%(lineno)s:: %(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
std_error:
format: '%(asctime)-15s %(levelname)s-%(name)s-%(process)d::%(module)s.%(funcName)s|%(lineno)s:: %(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
std_critical:
format: '%(asctime)-15s %(levelname)s-%(name)s-%(process)d::%(module)s.%(funcName)s|%(lineno)s:: %(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
std_critical_mail:
format: '%(asctime)-15s %(levelname)s-%(name)s-%(process)d::%(module)s.%(funcName)s|%(lineno)s:: %(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'