This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Mojo/Log.pm b/lib/Mojo/Log.pm | |
index 8b53b8e..0e6c421 100644 | |
--- a/lib/Mojo/Log.pm | |
+++ b/lib/Mojo/Log.pm | |
@@ -4,6 +4,7 @@ use Mojo::Base 'Mojo::EventEmitter'; | |
use Carp 'croak'; | |
use Fcntl ':flock'; | |
use Mojo::Util qw(deprecated encode monkey_patch); | |
+use Time::Piece 'localtime'; | |
has format => sub { \&_format }; | |
has handle => sub { | |
@@ -56,7 +57,7 @@ sub new { | |
sub warn { shift->_log(warn => @_) } | |
sub _format { | |
- '[' . localtime(shift) . '] [' . shift() . '] ' . join "\n", @_, ''; | |
+ '[' . localtime(shift)->datetime . '] [' . shift() . '] ' . join "\n", @_, ''; | |
} | |
sub _log { shift->emit('message', shift, @_) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment