...
- our implementation is based on the standard python logging framework: https://docs.python.org/23/library/logging.html
- we summerazized loading of config etc. in the
azeti_logging.py
...
- logger=azeti_file
- by default should be
level=INFO
- TimedRotatingFileHandlerSizeRotatingFileHandler
- rotation daily by midnight and 7 after 10490000 Bytes and 5 backup-files configure
other useful handlers:
Rotating by filesize: https://docs.python.org/23/library/logging.handlers.html#logging.handlers.RotatingFileHandler
Info |
---|
Have a look into the official docs to find examples for file size based rotation. |
Info | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
The default for the file size dependent parameters in the SiteController.cfg is
There is no need to have default parameters present in a SiteController.cfg file. Default values are used when there is no entry in the SiteController.cfg To change the count of old backup files per logfilename from default (5) to 15 add following snippet to the specific SiteController.cfg
|
Levels
Level | Numeric value | Intended purpose |
---|---|---|
CRITICAL | 50 | Used to log events so grave it causes the process not being able to continue running (e.g. a not specificially handled runtime error). |
ERROR | 40 | Used to log events which indicate an erroneous condition but the process can continue its processing by ignoring the fact (e.g. ignoring a contradictory configuration entry) |
WARNING | 30 | Used to log events which indicate erroneous or probably unwanted conditions and the process takes workaround measures to continue processing (e.g. a missing file and the process uses default values instead) |
INFO | 20 | Used to log seldom (!) informative events like starting and stopping of processes or configuration changes. |
DEBUG | 10 | Used to log anything else, especially any detailled log messages to debug a certain condition. |
NOTSET | 0 | This is not a real log level but causes the logger to determine the actual log level by looking somewhere else (refer to the Python documentation). |
...