Thelounge: All servers default to UTC for logging

Created on 1 Sep 2017  路  5Comments  路  Source: thelounge/thelounge

For some reason, we default all logging on all servers to UTC. The only way to get around this is to set a timezone in the config, which obviously won't change with DST.

Options:

  1. Remove the option altogether
  2. Remove it as a default config, but use the config if it is there

1 has the disadvantage of if anyone is actually using it, they won't be able to now. 2 has the disadvantage of requiring people to delete the config from their file to fix the issue.

The disadvantage of 2 does lead us to another option:

  1. Create a new line in the config that has no default, but users can set if they want to.

That would mean everyone would default to their server's time, but people can set another timezone if they want. It has the disadvantage of leaving an unused config in people's files, and if anyone currently uses the setting, it'll reset it for them.

Thoughts? I'm currently thinking of going for 3, despite the horribleness of it.

Bug

All 5 comments

Alright, this gets worse.

We have 2 different types of logging.

  1. Server logging, just stdout, for errors and stuff
  2. IRC logging, where we log the messages for a user

This much makes sense. However.... Server logging uses the timezone and format settings from IRC logging. There are no settings for server logging. Irc logging is per user, but the only logging setting per user is whether or not to do it. The format is the same for all users.

So... we should probably

  1. Add a new config entry for server logging (or remove it entirely, as it was never clear in the config that this was for server logging), that defaults the format to a sensible default (with timezone in it, unlike just now), and defaults the timezone to blank, which means we'll just use server time.
  2. Make the irc logging config entirely per-user, and either default to server time or utc. Again, the time format should probably include the timezone as well by default either way, to make it clear to the users what timezone it is in if they haven't set it. They can delete the timezone from the format if they want.

This is exactly how I would do it.

Users who have (ab)used the current "logs:timezone" setting to set a custom timezone for the console logging (which differs from their server time) will be affected by this though. But I can't imagine that there's many users who did this...

There is 1 question left with this that I'm unsure about.

If a user doesn't have their user log settings set up, do we default to sensible format and server time, or what the global log setting currently is? If someone has set the global userlogging settings, we don't really want that to be lost, do we?

How about we just remove timezone option and it's code? It's going to default to server's (node.js) timezone.

Agreed. timezone and format do not make sense for logs IMO. We should just log everything in ISO 8601 format.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fuzzy76 picture fuzzy76  路  4Comments

kevinoconnor7 picture kevinoconnor7  路  3Comments

MaxLeiter picture MaxLeiter  路  4Comments

McInkay picture McInkay  路  4Comments

McInkay picture McInkay  路  5Comments