Skip to content

Commit

Permalink
fixed logging of UTF-8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 18, 2010
1 parent 3a7bac3 commit f37966f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -44,6 +44,7 @@ This file documents the revision history for Perl extension Mojolicious.
- Fixed automatic reloading for external templates.
- Fixed after_build_tx plugin hook callback order.
- Fixed a small under bug in Mojolicious::Lite.
- Fixed logging of UTF-8 errors. (und3f)

0.999929 2010-08-17 00:00:00
- Removed OS X resource fork files.
Expand Down
3 changes: 2 additions & 1 deletion lib/Mojo/Log.pm
Expand Up @@ -68,7 +68,8 @@ sub log {
return $self unless $level && $self->is_level($level);

my $time = localtime(time);
my $msgs = join "\n", @msgs;
my $msgs = join "\n",
map { utf8::is_utf8 $_ ? $_ : utf8::encode $_} @msgs;

# Caller
my ($pkg, $line) = (caller())[0, 2];
Expand Down

0 comments on commit f37966f

Please sign in to comment.