Skip to content
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

Logs in UTC time #15198

Closed
chair28980 opened this issue Jun 15, 2024 · 10 comments · Fixed by #16373
Closed

Logs in UTC time #15198

chair28980 opened this issue Jun 15, 2024 · 10 comments · Fixed by #16373
Assignees
Labels
blocked chore core-team E:D Platform maintenance 2.31 Platform maintenance for Desktop for 2.31
Milestone

Comments

@chair28980
Copy link

Proposing switching logs to use UTC time, this would simplify the debugging process by providing a consistent time reference.

@richard-ramos
Copy link
Member

:-O i did not realize this task had already been assigned to @igor-sirotin
Sorry!

@chair28980
Copy link
Author

Fixed by status-im/go-ethereum#108

@igor-sirotin
Copy link
Contributor

igor-sirotin commented Jun 18, 2024

@jrainville I looked at the logs of the app we write from Nim. Local time is used there, not UTC.

But it seems that we don't really have control over this. nim-chronicles provide option to change the format of the timestamps (RFC 3339, Unix, None):
https://github.com/status-im/nim-chronicles/blob/33761a5f77610d3f87f774244490eae43a9ac5a1/README.md?plain=1#L376-L397

But it's always local time, this can be seen with usage of now() here:
https://github.com/status-im/nim-chronicles/blob/ccbb7566d1a06bfc1ec42dd8da74a47f1d3b3f4b/chronicles/log_output.nim#L425-L427

I don't think it's very important to have UTC in application logs, so far it was never a problem. It will be our of sync now with geth.log, but I guess we can live with that?

@igor-sirotin igor-sirotin moved this from Iteration Backlog to In Progress in Status Desktop/Mobile Board Jun 18, 2024
@fryorcraken
Copy link
Collaborator

I'd suggest UTC across all logs as we need to be able to correlate app events to Waku events. More intense debugging means it's a problem now.

@igor-sirotin
Copy link
Contributor

@jrainville should we mark this as blocked or smth?
I didn't investigate, but don't see a simple workaround until status-im/nim-chronicles#151 is implemented.

@jrainville jrainville modified the milestones: 2.30.0 Beta, 2.31.0 Beta Jul 9, 2024
@jrainville jrainville added E:D Platform maintenance 2.31 Platform maintenance for Desktop for 2.31 and removed E:D Platform maintenance 2.30 Platform maintenance for Desktop for 2.30 labels Jul 19, 2024
@chaitanyaprem
Copy link
Collaborator

nwaku logs time in UTC, so maybe we can check with them how it is done. iirc chronicles-logging only must be used there.
cc @Ivansete-status , maybe you can help how it is done using nim-chronicles

@igor-sirotin
Copy link
Contributor

@Ivansete-status would be great if you share how it's done in nwaku, if it is like that indeed !

@Ivansete-status
Copy link

@chaitanyaprem , @igor-sirotin - the nwaku is not printing in UTC. Instead, it prints from the local time. What is happening is that the fleets' hosts have the local time set to UTC and therefore, nwaku gets that time zone.

I've submitted the following PR in nim-chronicles to allow printing in UTC regardless the local zone: status-im/nim-chronicles#152

To use it, the following compilation flag should be added: -d:chronicles_timestamps="UnixTimeReadable"

@igor-sirotin
Copy link
Contributor

I've submitted the following PR in nim-chronicles

Thank you!

@Ivansete-status
Copy link

Ivansete-status commented Sep 19, 2024

Hello @igor-sirotin , @chaitanyaprem - the time can be expressed now in UTC from nim-chronicles. Please update to the latest. Then, to enable the UTC time, the following compilation setting should be used: -d:chronicles_timestamps="RfcUtcTime".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked chore core-team E:D Platform maintenance 2.31 Platform maintenance for Desktop for 2.31
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants