Skip to content

Draft: Resolve "Initial logging configuration skips logs in class methods"

Closes #21 (closed)

Problem

When starting up, pyCDB loads the configuration and configures the logger. However, missing configuration file is not reported.

Analysis

Until the logger is configured, all logs except for ERROR are lost due to the default logging level. Since configuration of the logs is driven either by an env. var or .CDBrc. If .CDBrc is the true configuration source, missing .CDBrc is not reported. Even though one can control the log. level through env. var., missing logs during the startup prolongs troubleshooting.

Solution

  1. This fix uses the log level ERROR for logging configuration details until the logger is configured. As a consequence, this will log a few additional log messages if the

Test

  • This fix was tested by running webcdb-fastapi in a VM.
Edited by Ivo Hanák

Merge request reports

Loading