[svk-commit] r2141 - branches/svk-logging/lib/SVK

stig at bestpractical.com stig at bestpractical.com
Wed Nov 15 10:27:19 EST 2006


Author: stig
Date: Wed Nov 15 10:27:19 2006
New Revision: 2141

Modified:
   branches/svk-logging/lib/SVK/Logger.pm

Log:
added a small config section

Modified: branches/svk-logging/lib/SVK/Logger.pm
==============================================================================
--- branches/svk-logging/lib/SVK/Logger.pm	(original)
+++ branches/svk-logging/lib/SVK/Logger.pm	Wed Nov 15 10:27:19 2006
@@ -4,8 +4,18 @@
 
 use SVK::Version;  our $VERSION = $SVK::VERSION;
 
-use Log::Log4perl;
+use Log::Log4perl qw(get_logger :levels);
 
+my $conf = q{
+  log4perl.rootLogger=INFO, Screen
+  log4perl.appender.Screen = Log::Log4perl::Appender::Screen
+  log4perl.appender.Screen.layout = PatternLayout
+  log4perl.appender.Screen.layout.ConversionPattern = %m%n
+};
+
+# ... passed as a reference to init()
+Log::Log4perl::init( \$conf );
+    
 sub import {
   my $class = shift;
   my $var = shift || 'logger';
@@ -27,8 +37,6 @@
   }
 }
 
-
-
 1;
 
 __END__
@@ -70,4 +78,20 @@
 
   XXX - somebody clueful please fill in -- I don't know Windows
 
+=head1 AUTHORS
+
+Stig Brautaset E<lt>stig at brautaset.orgE<gt>
+
+Chia-liang Kao E<lt>clkao at clkao.orgE<gt>
+
+=head1 COPYRIGHT
+
+Copyright 2003-2006 by Chia-liang Kao E<lt>clkao at clkao.orgE<gt>.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+See L<http://www.perl.com/perl/misc/Artistic.html>
+
+
 =cut


More information about the svk-commit mailing list