Logger class in api/helper/execution_tracking/Logger.py. It wraps Python’s standard logging module and automatically tags every log entry with the calling class and method name.
The Logger class
myLogger is pre-instantiated at the bottom of the file and imported wherever logging is needed.
Using the logger
Log levels
Auto-tagging
TheLogger inspects the call stack and prepends the calling class and method name to every message:
Logger in repositories
TheRepository base class and DBSession both use myLogger internally. Database operations are logged automatically:
Accessing logger in generated code
All generated services and repositories injectmyLogger via the constructor:
self.logger inside the class.
Log output format
The default format is:basicConfig call in Logger.py.