From: Mike S. <msc...@ao...> - 2003-10-13 18:51:50
|
Schmidtchen, Jens wrote on 10/13/2003, 11:21 AM: > please tell me: is it right??? > > as far as i have unterstood, DEBUG is a LOWER level than FATAL. how could > the above happen in case root logger catches only FATAL messages but > receives a DEBUG message propagated by Groceries' logger? wouldn't the > root > logger suppress the DEBUG message due to ist low priority? Yep, it's correct. As soon as one logger has decided to fire, the message is bubbling up and will be logged *unconditionally* by any loggers on the way up. If that's not what you want, use appender thresholds as the documentation points out. -- -- Mike Mike Schilli m...@pe... title: "beginner's pitfalls" <quote> Easy enough: Let's set the root logger to FATAL and attach a Log::Dispatch::Screen appender to it. Then, let's set the Groceries logger to DEBUG and attach a Log::Dispatch::File appender to it. Now, if any logger anywhere in the system issues a FATAL message and decides to 'fire,' the message will bubble up to the top of the logger hierarchy, be caught by every appender on the way and ultimately end up at the root logger's appender, which will write it to STDERR as required. Nice. But what happens to DEBUG messages originating within Groceries? Not only will the Groceries logger 'fire' and forward the message to its appender, but it will also percolate up the hierarchy and end up at the appender attached to the root logger. And, it's going to fill up STDERR with DEBUG messages from Groceries, whoa! </quote> please tell me: is it right??? as far as i have unterstood, DEBUG is a LOWER level than FATAL. how could the above happen in case root logger catches only FATAL messages but receives a DEBUG message propagated by Groceries' logger? wouldn't the root logger suppress the DEBUG message due to ist low priority? best regards, jens |