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

Log entries have different timezones and formats? #927

Closed
e-gineer opened this issue Sep 19, 2021 · 2 comments
Closed

Log entries have different timezones and formats? #927

e-gineer opened this issue Sep 19, 2021 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@e-gineer
Copy link
Contributor

e-gineer commented Sep 19, 2021

It's currently 11:07pm on 2021-09-18 US Eastern time for me. I ran a query and saw the following in the logs.

First, weirdly, it's in a log file for the next day (the 19th) ~/.steampipe/logs/database-2021-09-19.log.

Second, the log has two issues:

  1. The date format of log entries is different depending on the source.
  2. Logs from different sources are using both local time and UTC time.
2021-09-18T23:07:28.264-0400 [WARN]  plugin.steampipe-plugin-imap.plugin: [WARN]  listMessage: Subject:="One on One Educational Services Limited - Chat with redacted@gmail.com"
2021-09-18T23:07:28.264-0400 [WARN]  plugin.steampipe-plugin-imap.plugin: [WARN]  listMessage: body="<div style=3D'background-color: rgb(241,241,241);'> <table width=3D'960' bo=
2021-09-19 03:07:28.469 GMT [55010] LOG:  duration: 2618.573 ms
2021-09-19 03:07:28.472 GMT [55010] LOG:  statement: COMMIT
@kaidaguerre kaidaguerre added this to the v0.10.0 milestone Nov 11, 2021
@kaidaguerre kaidaguerre modified the milestones: v0.10.0, v0.10.1 Nov 25, 2021
@kaidaguerre kaidaguerre added the bug Something isn't working label Nov 25, 2021
@kaidaguerre kaidaguerre removed their assignment Nov 25, 2021
@kaidaguerre
Copy link
Contributor

there are now different log files for plugin and database, but we should use the same log format

@kaidaguerre kaidaguerre modified the milestones: v0.10.1, v0.11.1 Dec 23, 2021
@binaek
Copy link
Contributor

binaek commented Jan 4, 2022

The logging framework we use under the hood does not provide the necessary configurations to tweak the TZ of the timestamp that it uses. Currently it's always the local TZ.

We have a PR with them at hashicorp/go-hclog#104 which enabled custom time objects which will enable us to set the TZ in the timestamp that goes out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants