Subject: | SYNOPSIS should be two inline blocks |
Date: | Tue, 28 Aug 2012 10:14:41 +0100 |
To: | bugs-Dancer-Logger-Log4perl [...] rt.cpan.org |
From: | Matt S Trout <mst [...] shadowcat.co.uk> |
https://metacpan.org/module/Dancer::Logger::Log4perl#SYNOPSIS
Because it's a single block, if you don't notice the second comment it's
easy to miss that the log4perl.conf is separate and that you're not having
to put the log4perl config into the dancer config.
10:11 < kaisan> mst: uh, its documentation refers to putting the log4perl
config in my config.yml. I might've misread?
I would suggest changing the current -
=head1 SYNOPSIS
# In your config.yml
logger: log4perl
log4perl:
config_file: log4perl.conf
# In your log4perl.conf
log4perl.rootLogger = DEBUG, LOG1
log4perl.appender.LOG1 = Log::Log4perl::Appender::File
log4perl.appender.LOG1.filename = /var/log/mylog.log
log4perl.appender.LOG1.mode = append
log4perl.appender.LOG1.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.LOG1.layout.ConversionPattern = %d %p %m %n
=head1 DESCRIPTION
to
=head1 SYNOPSIS
In your config.yml:
logger: log4perl
log4perl:
config_file: log4perl.conf
In your log4perl.conf:
log4perl.rootLogger = DEBUG, LOG1
log4perl.appender.LOG1 = Log::Log4perl::Appender::File
log4perl.appender.LOG1.filename = /var/log/mylog.log
log4perl.appender.LOG1.mode = append
log4perl.appender.LOG1.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.LOG1.layout.ConversionPattern = %d %p %m %n
=head1 DESCRIPTION
since then people shouldn't get confused as easily.
(I explained it to kaisan who's now happy though :)
--
Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue
http://shadowcat.co.uk/blog/matt-s-trout/ http://twitter.com/shadowcat_mst/
Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst
commercial support, training and consultancy packages could help your team.