Static::Simple: Support a less confusing way to enable logging
Andy Grundman [Sat, 30 Jun 2007 19:50:04 +0000 (19:50 +0000)]
Changes
lib/Catalyst/Plugin/Static/Simple.pm

diff --git a/Changes b/Changes
index e6a237c..2d534bf 100644 (file)
--- 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)
 
index aa0c732..7f9ab73 100644 (file)
@@ -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
-C<MyApp-E<gt>config-E<gt>{static}-E<gt>{no_logs}> to 0.
+C<MyApp-E<gt>config-E<gt>{static}-E<gt>{logging}> to 1.
 
 =head2 Forcing directories into static mode