[Haskell-cafe] Logging

MigMit migmit at gmail.com
Sun Nov 21 22:34:09 UTC 2021

No, non-UTC logs are a nightmare when you have developers living in different time zones. Or even in one that is different from the one where the logs come from. Not only does it still have the same overhead, but it also adds DST troubles to the mix (yes, DST does not start at the same time everywhere) and is generally MORE confusing than just having everything in UTC.

Also, editors might be fast... but only if you don't have too much logs. I did work on one project where daily logs took tens of gigabytes in gzip. Editors were out of question, trying to load this in Emacs would just hang it. Things like zgrep were pretty much the only thing that could work. Another project simply used Datadog, and was way easier to work with, despite it being a web interface.

There could be some specific cases where logging in a local time zone is a good idea, but I don't think that happens often enough.

> On 21 Nov 2021, at 22:47, Joachim Durchholz <jo at durchholz.org> wrote:
> Am 21.11.21 um 19:18 schrieb Tom Ellis:
>> It sounds really unwise to log timestamps in anything in other than
>> UTC.  If you want to see the logged times in your local timezone then
>> why not apply that conversion when you read the log?
> UTC is wise only if you really have to deal with data originating from multiple timezones.
> Otherwise, it's just an additional interpretation step that makes it harder to read the raw logs - which not a very rare use case actually, editors are still the fastest way to find specific log records after all (mostly because you don't have to learn the web interface du jour just to search for something).
> E.g. the application I'm working with logs to text files, and it always runs in the same time zone.
> UTC is just an extra hoop to jump through, with no added benefit.
> (Some users do live in a separate time zone, but we rarely need to correlate user-side and server-side logs, we go by session ids anyway.)
> Regards,
> Jo
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.

More information about the Haskell-Cafe mailing list