From: Andy Grundman Date: Sat, 30 Jun 2007 19:50:04 +0000 (+0000) Subject: Static::Simple: Support a less confusing way to enable logging X-Git-Tag: v0.18~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Static-Simple.git;a=commitdiff_plain;h=6a009cf08859e568c566a28d60f540bdf51bbbb1 Static::Simple: Support a less confusing way to enable logging --- diff --git a/Changes b/Changes index e6a237c..2d534bf 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,9 @@ Revision history for Perl extension Catalyst::Plugin::Static::Simple + +0.18 + - Logging may now be enabled with the less confusing + MyApp->config->{static}->{logging} = 1; + 0.17 2007-05-11 11:00:00 - Added serve_static_file, to serve a given file as static. (groditi) diff --git a/lib/Catalyst/Plugin/Static/Simple.pm b/lib/Catalyst/Plugin/Static/Simple.pm index aa0c732..7f9ab73 100644 --- a/lib/Catalyst/Plugin/Static/Simple.pm +++ b/lib/Catalyst/Plugin/Static/Simple.pm @@ -8,7 +8,7 @@ use File::Spec (); use IO::File (); use MIME::Types (); -our $VERSION = '0.17'; +our $VERSION = '0.18'; __PACKAGE__->mk_accessors( qw/_static_file _static_debug_message/ ); @@ -92,6 +92,7 @@ sub setup { $config->{ignore_dirs} ||= []; $config->{debug} ||= $c->debug; $config->{no_logs} = 1 unless defined $config->{no_logs}; + $config->{no_logs} = 0 if $config->{logging}; # load up a MIME::Types object, only loading types with # at least 1 file extension @@ -322,7 +323,7 @@ Since Catalyst 5.50, logging of static requests is turned off by default; static requests tend to clutter the log output and rarely reveal anything useful. However, if you want to enable logging of static requests, you can do so by setting -Cconfig-E{static}-E{no_logs}> to 0. +Cconfig-E{static}-E{logging}> to 1. =head2 Forcing directories into static mode