-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add timezone to default logging time #856
base: master
Are you sure you want to change the base?
Conversation
Hi @tim-habitat. Thanks for the improvement proposal. 👍 I do like the idea of displaying the timezone by default since it eliminates any potential ambiguities. It feels good, indeed. On the other hand, I also appreciate the simplicity of the current format. Repeatedly displaying the timezone is not necessarily useful for the default user, especially when Loguru is used as a replacement of Basically, I see two cases where the timezone is very valuable:
However, these are not necessarily common use cases and are intended for the more advanced user. So it would make sense to leave the format without timezone by default, since it is a bit less cumbersome to read. Considering that many libraries and tools do not display the timezone by default, and that this may be what the end user prefers, I would rather leave the format as is. But in the end, I have mixed feelings. On a side note, there is also the question of the default format used for file names. Currently, the naive local time is used. It is difficult to consider displaying the timezone, since "+" in the file name raises concerns about portability and usability. Maybe it could be left as is or converted to UTC with "Z" suffix. |
Hey, Thanks for the reply! I take the point that not everyone would want that timezone info in their logs - particularly as it may be redundant during local development. On the filename, i think converting to UTC would make the most sense - but this needs to be easily understood by the users for the same reasons. I don't really see any other way either to include an |
Yes, that's totally how I feel as well. I agree with you about enforcing good practices, even if it can be a bit annoying visually, it shouldn't be a big deal. I'm leaving this open for now, I could probably make it the default for the next version, thanks. 👍 |
hey @Delgan - did you have anymore thoughts about this ? :) |
I'm waiting for the next minor release, namely |
amazing thanks - looking forward to it! |
any progress :P ? |
This comment was marked as spam.
This comment was marked as spam.
6 similar comments
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
Any updated thoughts on this @Delgan ? :) |
Sorry for the delay @tim-x-y-z. 😬 I still plan to merge your PR after the next release of v0.7.3. It's just that I haven't yet found the time to implement the necessary fixes for the release to happen. |
@Delgan no worries ! |
Hi thanks for the great library! 🤙
Started using it recently, and having resources in various locations I thought it would be great to have the timezone information in the default format.
I realised that i could define a custom format for my need - but everything else just works out of the box, it felt that just this could be a nice default to have too.
Let me know your thoughts.