fix unicode in chain and path parts + debug console
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Log.pm
old mode 100755 (executable)
new mode 100644 (file)
index 72ae936..a599284
@@ -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;
 };
 
@@ -140,6 +141,7 @@ sub _send_to_log {
     if ($self->can('_has_psgi_errors') and $self->_has_psgi_errors) {
         $self->_psgi_errors->print(@_);
     } else {
+        binmode STDERR, ":utf8";
         print STDERR @_;
     }
 }