Subject: | Exposing too much information... |
The current behavior of modifying $0 is useful to debugging, but
exposes rather more information than some production applications would
like - especially argument lists. It's arguably a security issue...
There should be an option to turn this off, perhaps statusupdate =>
false?
Related in that it's also an information exposure as well as a
performance concern:
I've also noticed that a lot of debugging messages are logged at INFO.
It's no big deal to ignore these in a logging routine. But the code is
doing a lot of work to generate unwanted messages (when they're
unwanted). Doesn't seem like a big deal until you have a lot of
frequent tasks...
It would be good to have a loglevel parameter that specifies the
mimimum priority message that the user desires. And to condition the
both the logging callback AND the data generation - especially the arg
list formatting - on the level.
E.G. loglevel => 2 = generate only ERROR level messages.
Then the code looks like:
if( $log && $loglevel <= 2 ) {
$msg = long message...
$log->(2, $msg);
}
and
$log->(1, "Simple message") if( $log && $loglevel <= 1 );
instead of
$msg = ...
$log->(2, $msg) if $log;
Thanks for your consideration.