runtime: fix logging with -Debug
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Log.pm
index a28c373..80e7182 100644 (file)
@@ -42,7 +42,13 @@ around new => sub {
     my $orig = shift;
     my $class = shift;
     my $self = $class->$orig;
-    $self->levels( scalar(@_) ? @_ : keys %LEVELS );
+
+    if (@_ == 1 && $_[0] eq 'debug') {
+        $self->levels( keys %LEVELS );
+    } else {
+        $self->levels( scalar(@_) ? @_ : keys %LEVELS );
+    }
+
     return $self;
 };