More log levels
Adds TRACE
and INSPECT
PROFILE
log levels.
Any better name for a level between DEBUG
and TRACE
? Maybe PROFILE
? (see suggestion below)
I'd suggest the following guidelines:
-
INFO
: not used internally, reserved for module developers (maybe log top-level scheduler stuff here, like start of initialize, connect, run, finalize?) -
PROFILE
: logging for stuff that might impact performance, like unit conversions, storing slot data to disk, ... -
DEBUG
: current logging of the scheduler, components and adapters -
TRACE
: current logging for everything below components (i/o slots, connector, ...)
Distributed the logging over more levels.
INFO
: top-level scheduler events
2022-12-08 14:55:28,618 INFO: init composition - FINAM
2022-12-08 14:55:28,620 INFO: validate composition - FINAM
2022-12-08 14:55:28,620 INFO: connect components - FINAM
2022-12-08 14:55:28,834 INFO: validate components - FINAM
2022-12-08 14:55:28,850 INFO: run composition - FINAM
2022-12-08 14:55:30,392 INFO: finalize components - FINAM
2022-12-08 14:55:30,440 INFO: finalize composition - FINAM
PROFILE
: like INFO
, but reports file access and unit conversions (could add more performance-related stuff)
DEBUG
: Component-level information:
2022-12-08 14:57:13,247 DEBUG: update - current time: 2000-12-21 00:00:00 - FINAM.CallbackGenerator
2022-12-08 14:57:13,248 DEBUG: source updated - FINAM.CallbackGenerator.->.Inflow. >> .AvgOverTime
2022-12-08 14:57:13,248 DEBUG: update - current time: 2000-12-21 00:00:00 - FINAM.ReservoirModel
2022-12-08 14:57:13,248 DEBUG: get data - FINAM.CallbackGenerator.->.Inflow. >> .AvgOverTime
2022-12-08 14:57:13,250 DEBUG: update - current time: 2000-12-21 00:00:00 - FINAM.ReservoirModel
2022-12-08 14:57:13,253 DEBUG: update - current time: 2000-12-22 00:00:00 - FINAM.CallbackGenerator
2022-12-08 14:57:13,254 DEBUG: source updated - FINAM.CallbackGenerator.->.Inflow. >> .AvgOverTime
2022-12-08 14:57:13,254 DEBUG: update - current time: 2000-12-22 00:00:00 - FINAM.ReservoirModel
2022-12-08 14:57:13,254 DEBUG: get data - FINAM.CallbackGenerator.->.Inflow. >> .AvgOverTime
2022-12-08 14:57:13,256 DEBUG: update - current time: 2000-12-22 00:00:00 - FINAM.ReservoirModel
TRACE
: Everything, just like DEBUG
before this change.
Edited by Martin Lange