- Notifications
You must be signed in to change notification settings - Fork 0
Home
Eyal Tuzon edited this page Nov 10, 2022
·
18 revisions
Hierarchical logging help to group logs that are related to the same code flow.
Log style can be styled in Yaml format or in Line format.
- log: 2022-10-21 21:30:16.361425 [INFO] [manual_hierarchy_line_logging.py.<module>:13] main level logchildren:
- log: 2022-10-21 21:30:16.367386 [INFO] [manual_hierarchy_line_logging.py.<module>:15] child 1children:
- log: 2022-10-21 21:30:16.373975 [INFO] [manual_hierarchy_line_logging.py.<module>:17] child 1_1
- log: 2022-10-21 21:30:16.380979 [INFO] [manual_hierarchy_line_logging.py.<module>:19] child 2
- log: 2022-10-21 21:30:16.387013 [INFO] [manual_hierarchy_line_logging.py.<module>:21] continue main level---
date: 2022-10-21 21:20:49.658272log_level: WARNpath: demo_classes.py.Amethod: a1line_number: 32message: Message 1children:
- date: 2022-10-21 21:20:49.666366log_level: INFOpath: demo_classes.py.Childmethod: child_1line_number: 16message: Child 1children:
- date: 2022-10-21 21:20:49.675316log_level: INFOpath: demo_classes.py.Childmethod: child_2line_number: 20message: Child 2Automatic hierarchy and manual hierarchy are supported.
- Automatic hierarchy: Logs hierarchy is determined by the level of the method in the Stack Trace
- Manual hierarchy: Logs in the same methods hierarchy are determined by the user
logger_manager
Logger
Stream Handler
Configuration file
Release Notes