undo 310c2a3 ('change default log level to info') - fixes S::S
Henry Van Styn [Sun, 10 Aug 2014 11:54:40 +0000 (07:54 -0400)]
In 310c2a39c the Catalyst::Log conststructor was modified to strip
'debug' from the list of of levels by replacing a call to the keys of
%LEVELS with a hard-coded list. This broke the test suite of
Static::Simple and has been rolled back for now. With this change, now
the S::S tests should pass, and, hopefully the whole travis test suite,
including the new resverse dep testing...

The original intent to 'change the default log level from debug to info'
now needs to be revisited...

Commands used for reference:

 git checkout 5.90065 -- lib/Catalyst/Log.pm
 git checkout 5.90065 -- t/aggregate/unit_core_setup.t
 git checkout 5.90065 -- t/aggregate/unit_core_setup_log.t

Other files changed in 310c2a39c but *not* reverted in this commit:

 Changes
 t/lib/TestApp/Controller/Log.pm
 t/psgi-log.t

lib/Catalyst/Log.pm [changed mode: 0755->0644]
t/aggregate/unit_core_setup.t
t/aggregate/unit_core_setup_log.t

old mode 100755 (executable)
new mode 100644 (file)
index 72ae936..e70197f
@@ -66,7 +66,8 @@ around new => sub {
     my $class = shift;
     my $self = $class->$orig;
 
-    $self->levels( scalar(@_) ? @_ : (qw/info warn error fatal/) );
+    $self->levels( scalar(@_) ? @_ : keys %LEVELS );
+
     return $self;
 };
 
index 3b778f4..c0e6230 100644 (file)
@@ -70,7 +70,7 @@ foreach my $name (grep { /^(CATALYST|TESTAPP)/ } keys %ENV) {
     ok $log->is_error, 'Errors should be enabled';
     ok $log->is_fatal, 'Fatal errors should be enabled';
     ok $log->is_info, 'Info should be enabled';
-    ok !$log->is_debug, 'Debugging should not be enabled';
+    ok $log->is_debug, 'Debugging should be enabled';
     ok !$c->debug, 'Catalyst debugging turned off';
 }
 my $log_meta = Class::MOP::Class->create_anon_class(
index 9e80cf4..fb73297 100644 (file)
@@ -76,13 +76,13 @@ foreach my $name (grep { /^(CATALYST|TESTAPP)/ } keys %ENV) {
     my $app = mock_app('TestAppLogEmptyString');
     $app->setup_log('');
     ok !$app->debug, 'Not In debug mode';
-    # Note that by default, you get _all_ the log levels turned on over debug
+    # Note that by default, you get _all_ the log levels turned on
     test_log_object($app->log,
         fatal => 1,
         error => 1,
         warn => 1,
         info => 1,
-        debug => 0,
+        debug => 1,
     );
 }
 {