Log::Log4perl::AutoCategorize

Log::Log4perl::AutoCategorize - extended Log::Log4perl logging.
Download

Log::Log4perl::AutoCategorize Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jim Cromie
  • Publisher web site:
  • http://search.cpan.org/~jcromie/Log-Log4perl-AutoCategorize-0.03/lib/Log/Log4perl/AutoCategorize.pm

Log::Log4perl::AutoCategorize Tags


Log::Log4perl::AutoCategorize Description

Log::Log4perl::AutoCategorize - extended Log::Log4perl logging. Log::Log4perl::AutoCategorize - extended Log::Log4perl logging.ABSTRACTLog::Log4perl::AutoCategorize extends Log::Log4perls (l4p) easy mode, adding 2 main features; 1. extended, automatic, transparent categorization capabilities a. logging category 'Logger', # shorthand class-name alias # you can initialize in use statement # 1st way gives separation of code from config # 2nd way is good for demonstration and early development initfile => $filename, initstr => q{ # see Log4perl docs to understand these directives log4perl.rootLogger=DEBUG, A1 # log4perl.appender.A1=Log::Dispatch::Screen log4perl.appender.A1 = Log::Dispatch::File log4perl.appender.A1.filename = ./mylog log4perl.appender.A1.mode = write log4perl.appender.A1.layout = PatternLayout log4perl.appender.A1.layout.ConversionPattern=%d %c %m%n # create TEST-COVERAGE log log4perl.appender.COVERAGE = Log::Dispatch::File log4perl.appender.COVERAGE.mode = write log4perl.appender.COVERAGE.layout = org.apache.log4j.PatternLayout log4perl.appender.COVERAGE.layout.ConversionPattern = (%d{HH:mm:ss.SSS}) %c: %m%n # save timestamped versions, 1 per process log4perl.appender.COVERAGE.filename = sub {"./test-coverage.txt.". scalar localtime} # now, add the value: send the stuff written at END to it log4perl.logger.Log.Log4perl.Autocategorize.END = INFO, COVERAGE }, ); foreach (1..500) { Logger->warn($_); foo(); A->bar(); A::bar(); } sub foo { foreach (1..20) { Logger->warn($_); } } package A; sub bar { my @d; foreach (reverse 1..10) { push @d, $_; Logger->warn("t-minus:", $_,@d); } }Requirements:· Perl


Log::Log4perl::AutoCategorize Related Software