Add stdout/file/syslog handler to root logger, not
libtaskotron logger. logger.init() is called only when we are
running runner.py, so we know that libtaskotron is the one that
should handle root logger.
Details
Details
Run upgradepath through runtask and observe that
output contains debug messages from upgradepath.
Diff Detail
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
Yeah, I think this is the correct behavior - the main script should configure the root logger. When we run through runtask, we are the main script. And logger.init() is run only when started this way (but not when used as a library). Seems OK.
Comment Actions
Please add a parameter set_rootlogger=False to the init() method, and add set_rootlogger=True to the appropriate init call in runtask.
That is better than working with the assumption that init() is called just from runtask.