add handlers to root logger instead of libtaskotron logger
ClosedPublic

Authored by garretraziel on Jun 6 2014, 8:27 AM.

Details

Summary

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.

Test Plan

Run upgradepath through runtask and observe that
output contains debug messages from upgradepath.

Diff Detail

Repository
rLTRN libtaskotron
Lint
Lint Skipped
Unit
Unit Tests Skipped
garretraziel retitled this revision from to add handlers to root logger instead of libtaskotron logger.Jun 6 2014, 8:27 AM
garretraziel updated this object.
garretraziel edited the test plan for this revision. (Show Details)
garretraziel added a reviewer: kparal.
kparal accepted this revision.Jun 10 2014, 7:37 AM

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.

This revision is now accepted and ready to land.Jun 10 2014, 7:37 AM
jskladan requested changes to this revision.Jun 10 2014, 11:15 AM

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.

This revision now requires changes to proceed.Jun 10 2014, 11:15 AM
garretraziel updated this revision to Diff 381.Jun 10 2014, 1:44 PM
  • add set_rootlogger to logger.init
jskladan accepted this revision.Jun 10 2014, 2:02 PM

coolio!

This revision is now accepted and ready to land.Jun 10 2014, 2:02 PM
garretraziel requested a review of this revision.Jun 10 2014, 2:14 PM
kparal accepted this revision.Jun 10 2014, 2:15 PM
This revision is now accepted and ready to land.Jun 10 2014, 2:15 PM
jskladan accepted this revision.Jun 10 2014, 2:17 PM

stop this acking madness!

garretraziel closed this revision.Jun 10 2014, 2:25 PM
garretraziel updated this revision to Diff 382.

Closed by commit rLTRN2877a86cc040 (authored by Garret Raziel <boloomka@gmail.com>).