2018-01-07 21:49:08 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
# ____ ____ ______ __ __ __ _____
|
|
|
|
|
# / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ |__ /
|
|
|
|
|
# / __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ /_ <
|
|
|
|
|
# / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / ___/ /
|
|
|
|
|
#/_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ /____/
|
|
|
|
|
# German BOS Information Script
|
|
|
|
|
# by Bastian Schroll
|
|
|
|
|
|
|
|
|
|
[loggers]
|
|
|
|
|
keys=root
|
|
|
|
|
|
|
|
|
|
[logger_root]
|
|
|
|
|
handlers=screen,file
|
|
|
|
|
level=NOTSET
|
2025-07-22 09:35:16 +02:00
|
|
|
# NOTSET means: accept all levels (the handlers will filter by their own level)
|
2018-01-07 21:49:08 +01:00
|
|
|
|
|
|
|
|
[formatters]
|
|
|
|
|
keys=simple,complex
|
|
|
|
|
|
|
|
|
|
[formatter_simple]
|
2018-01-08 23:40:54 +01:00
|
|
|
format=%(asctime)s,%(msecs)03d - %(module)-15s [%(levelname)-8s] %(message)s
|
2018-01-07 21:49:08 +01:00
|
|
|
datefmt=%d.%m.%Y %H:%M:%S
|
|
|
|
|
|
|
|
|
|
[formatter_complex]
|
2018-09-21 10:56:20 +02:00
|
|
|
format=%(asctime)s,%(msecs)03d - %(threadName)-15s %(module)-15s %(funcName)-18s [%(levelname)-8s] %(message)s
|
2018-01-07 21:49:08 +01:00
|
|
|
datefmt=%d.%m.%Y %H:%M:%S
|
|
|
|
|
|
|
|
|
|
[handlers]
|
|
|
|
|
keys=file,screen
|
|
|
|
|
|
|
|
|
|
[handler_file]
|
|
|
|
|
class=handlers.TimedRotatingFileHandler
|
|
|
|
|
formatter=complex
|
2022-05-04 23:01:40 +02:00
|
|
|
level=ERROR
|
2025-07-22 09:35:16 +02:00
|
|
|
args=('log/server.log', 'midnight', 1, 7, 'utf-8')
|
|
|
|
|
# explaining args:
|
|
|
|
|
# - 'midnight' → rotate daily at midnight, Options: 'S', 'M', 'H', 'D', 'midnight' or 'W0'-'W6' (0=Monday, 6=Sunday)
|
|
|
|
|
# - 1 → rotate every 1 "x" (see line above), Options: 1, 2, ..., 31
|
|
|
|
|
# - 7 → keep last 7 logs, Options: 1, 2, ..., 31
|
|
|
|
|
# - 'utf-8' → encoding of the log file, don't change
|
2018-01-07 21:49:08 +01:00
|
|
|
|
|
|
|
|
[handler_screen]
|
|
|
|
|
class=StreamHandler
|
|
|
|
|
formatter=simple
|
|
|
|
|
level=DEBUG
|
2018-01-12 11:15:11 +01:00
|
|
|
args=(sys.stdout,)
|