| Log-Log4perl documentation | Contained in the Log-Log4perl distribution. |
Log::Log4perl::Layout::SimpleLayout - Simple Layout
use Log::Log4perl::Layout::SimpleLayout; my $layout = Log::Log4perl::Layout::SimpleLayout->new();
This class implements the log4j simple layout format -- it basically
just prints the message priority and the message, that's all.
Check
http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/SimpleLayout.html
for details.
Copyright 2002-2009 by Mike Schilli <m@perlmeister.com> and Kevin Goess <cpan@goess.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Log-Log4perl documentation | Contained in the Log-Log4perl distribution. |
################################################## package Log::Log4perl::Layout::SimpleLayout; ################################################## # as documented in # http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/SimpleLayout.html ################################################## use 5.006; use strict; use warnings; use Log::Log4perl::Level; no strict qw(refs); use base qw(Log::Log4perl::Layout); ################################################## sub new { ################################################## my $class = shift; $class = ref ($class) || $class; my $self = { format => undef, info_needed => {}, stack => [], }; bless $self, $class; return $self; } ################################################## sub render { ################################################## my($self, $message, $category, $priority, $caller_level) = @_; return "$priority - $message\n"; } 1; __END__