[Dancer-users] UTC timestamp for logger_format
damien krotkine
dkrotkine at gmail.com
Mon Apr 9 17:32:50 CEST 2012
I agree with this change, seems a good added feature
On 8 April 2012 16:32, David Precious <davidp at preshweb.co.uk> wrote:
> On Sat, 7 Apr 2012 21:30:19 +0100
> Alex C <calyx238 at gmail.com> wrote:
>
>> I noticed that Dancer gets its timestamps using localtime(). I prefer
>> to have all my logs in UTC.
>>
>> Please can I suggest the following patch to Dancer::Logger::Abstract
>> to provide an option for this?
>>
>> @@ -94,6 +94,7 @@ sub format_message {
>> t => sub { Encode::decode(setting('charset') || 'utf8',
>> POSIX::strftime( "%d/%b/%Y
>> %H:%M:%S", localtime )) },
>> T => sub { POSIX::strftime( "%Y-%m-%d %H:%M:%S", localtime
>> ) },
>> + U => sub { POSIX::strftime( "%Y-%m-%d %H:%M:%S", gmtime ) },
>> P => sub { $$ },
>> L => sub { $level },
>> D => sub {
>
> That sounds pretty sane and worthwhile, I'd support that change.
>
> If you would like to be credited as an author via GitHub, feel free to
> submit a pull request with it; if not, I'll make that change soon,
> assuming other devs agree (it's such a simple and sensible addition I
> see no reason why anyone would disagree :) ).
>
>
> --
> David Precious ("bigpresh") <davidp at preshweb.co.uk>
> http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter
> www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook
> www.preshweb.co.uk/cpan www.preshweb.co.uk/github
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
More information about the Dancer-users
mailing list