From: <msc...@ao...> - 2002-09-09 06:27:14
|
> Maybe Mozilla is doing weird stuff... anyway, I > re-confirmed that the patch works. But to make life > easy, I put it up on my website. Interesting. Can you confirm the patch works even after you send mail to yourself? Anyway, the patch on your website worked (yay!) like a charm. Couple of questions/requests on your changes: * Looks like the error message here got garbeled (Logger.pm): my $after = shift || die("create_custom_level: forgot to pass in an after string! * What's the purpose of our %PRIORITY = (); # unless (%PRIORITY); our %LEVELS = () unless (%LEVELS); our %SYSLOG = () unless (%SYSLOG); And why the '#' in the first line? * Documentation: Can you add a couple of lines to Log::Log4perl.pm to show how to use the custom level features? * Why the logic # figure out new int value by AFTER + (AFTER+ 1) / 2 if you could just store the priorities defined so far orderly in an array and switch to the next/previous element? * # This is a bit better way to create code on the fly than eval'ing strings. # -erik Nice. Does this mean they're (-d) debuggable now? Could we go all the way and use this in set_output_methods() as well? Looks like your foreach loop is outside the subroutine and therefore only called when the module is loaded: #now lets autogenerate the logger subs based on the defined priorities foreach my $level (keys %Log::Log4perl::Level::PRIORITY){ create_log_level_methods($level); } Would be great if you could shed some light on these issues ... :) -- Mike Mike Schilli log...@pe... http://perlmeister.com |