Chris McDonough wrote: > Calling getLogger results in an *atexit* hook related to a handler being > registered for the current Python process. It might also, depending on > its mood, print to stdout. These things make it miserable to actually > unit test any application which calls getLogger. See also > http://plope.com/Members/chrism/logging_blues
You want LogCapture: http://packages.python.org/testfixtures/logging.html Admittedly, I hadn't noticed the atexit hook getting added, but I've never been bitten by it.. > That said, you can pass in a logger instance to the Configurator as a > debug logger (as the debug_logger parameter) if you need to replace it > to capture logging output of BFG itself during a "unit test" (more > likely a functional test really). Yep, certainly functional tests... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev