# -*- coding: utf-8 -*- # ____ ____ ______ __ __ __ _____ # / __ )/ __ \/ ___/ | / /___ _/ /______/ /_ |__ / # / __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ /_ < # / /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / ___/ / #/_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ /____/ # German BOS Information Script # by Bastian Schroll [loggers] keys=root [logger_root] handlers=screen,file level=NOTSET # NOTSET means: accept all levels (the handlers will filter by their own level) [formatters] keys=simple,complex [formatter_simple] format=%(asctime)s,%(msecs)03d - %(module)-15s [%(levelname)-8s] %(message)s datefmt=%d.%m.%Y %H:%M:%S [formatter_complex] format=%(asctime)s,%(msecs)03d - %(threadName)-15s %(module)-15s %(funcName)-18s [%(levelname)-8s] %(message)s datefmt=%d.%m.%Y %H:%M:%S [handlers] keys=file,screen [handler_file] class=handlers.TimedRotatingFileHandler formatter=complex level=ERROR 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 [handler_screen] class=StreamHandler formatter=simple level=DEBUG args=(sys.stdout,)