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 should contain timestamp #723

Closed
brindosch opened this issue Mar 11, 2020 · 4 comments · Fixed by #885
Closed

Log should contain timestamp #723

brindosch opened this issue Mar 11, 2020 · 4 comments · Fixed by #885

Comments

@brindosch
Copy link
Contributor

Feature request

As requested by @b1rdhous3 @Lord-Grey, the timestamp format should be?

  • UTC ISO 8601 (2007-12-24T18:21Z) (great for JS parsing, browser can transform to local time out of the box)
  • custom format in current timezone without year MM-DD-hh:mm:ss:ms
  • another

What problem does this feature solve?

log basics: timestamp.

What does the proposed API look like?

see above

How should this be implemented in your opinion?

In the logger class. The json representation should get a timestamp field for webui

Are you willing to work on this yourself?

@Paulchen-Panther
Copy link
Member

Are you willing to work on this yourself?

Yes? No? 😁

@Lord-Grey
Copy link
Collaborator

Lord-Grey commented Mar 11, 2020

UTC ISO 8601 (2007-12-24T18:21Z) (great for JS parsing, browser can transform to local time out of the box)

Out of the box capabilities which simplify things should be followed.

Would be good to allow for millisecond timestamps, too.
Not as standard, but for Debug purposes. No need to have ms via UI, but would be good to have them as part of stdout- Output. e.g. YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
In addition, for the Debug/stdout scenario it would be helpful to have the delta time in ms to the previous log-line (see File-Device Output).

@janpfischer
Copy link
Contributor

I vote for ISO 8601.
BTW: Do we log in a file? E.g. if the webui is not working and you don't want or can't turn on --debug you would be screwed because of no log files.

@brindosch
Copy link
Contributor Author

Out of the box capabilities which simplify things should be followed.

True. the std logging can be modified to be more specific

Do we log in a file?

No, and this is indeed a concern, can be added too. Saved in user data path xxx/hyperion.log. If on startup this files exists it should be renamed xxx/hyperion.old.log to persist the last run. This idea is shameless copied from kodi. Not sure if kodi has a log rotator for 24/7 running instances

Summary

  • ISO for json
  • with ms for stdout
  • Proposed ISO for logfile. But the logfile spec is probably another issue :)

Are you willing to work on this yourself?

Yes? No? 😁

Thank you for jumping in! 😈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants