litestream
litestream copied to clipboard
Add option to enable timestamps in logging
Litestream doesn't currently use timestamps in its log messages because timestamps are usually attached by the supervisor (e.g. systemd
). Adding a flag to enable timestamps would be helpful for some folks though.
Discussed in https://github.com/benbjohnson/litestream/discussions/256
Originally posted by insinger December 22, 2021 Have you considered including a time/datestamp on any of the messages sent to the console? I've had a case where I can see several lines with messages like "sync error: create generation: initialize shadow wal: read header: EOF", a situation which was eventually resolved by actions taken by the application. But from looking at the console messages I can't tell whether that situation is still active, or when it was resolved. In other words, was the last message written 1 minute ago or 1 day ago? A timestamp would really help in this case.
Similarly, it would be nice to at-a-glance see when the snapshot was written when I see a message "snapshot written 7c04f098aa5bc5b2/00000000". I know I could use the CLI 'snapshots' command to figure this out, but having it right there alongside the message is mighty convenient.