Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Log-Dispatchouli CPAN distribution.

Report information
The Basics
Id: 77622
Status: rejected
Priority: 0/
Queue: Log-Dispatchouli

People
Owner: Nobody in particular
Requestors: cjm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 2.005
Fixed in: (no value)



Subject: Proxy fails to suppress level => 'debug' messages
When logging to a Log::Dispatchouli::Proxy object, there's a significant difference between $log->log_debug('message'); and $log->log({level => 'debug'}, 'message'); The first will be suppressed if the proxy is not in debug mode, but the second will not. That appears to be because the check is done in log_debug. The log method should also check for debug-level messages and suppress them if not in debug mode.
I'm not sure this is a feature of proxy objects, rather than any logger. At any rate, the "do not log debug unless in debugging mode" is documented as a feature of log_debug, not log + level. Although I think an argument could be made that level should be significant, it would be a bit of a pain to implement. The proxy decides whether to log, then passes the logging information along to the parent logger, and debugging can be set on a per-proxy basis. If the proxy was set to debug mode, but the parent is not, and the parent received a level=debug message, it would need to know to log it anyway because the proxy said so. I think it's better to just use the methods as documented. -- rjbs