Disable timestamp in logging output #894

Open
opened 2024-10-29 14:10:40 +00:00 by mediocregopher · 2 comments

Hello, I recognize this is super low priority, but I was wondering if there exists in v1.0.x a way to disable the timestamp which is output as part of the logs? If not, would that be something you would be open to adding?

I run garage using a process manager which already includes the timestamp as part of the logs, so having it again just makes the log line harder to read.

Thanks!

Hello, I recognize this is super low priority, but I was wondering if there exists in v1.0.x a way to disable the timestamp which is output as part of the logs? If not, would that be something you would be open to adding? I run garage using a process manager which already includes the timestamp as part of the logs, so having it again just makes the log line harder to read. Thanks!
mediocregopher changed title from Disable timstamp in logging output to Disable timestamp in logging output 2024-10-29 14:48:45 +00:00
Owner

This could cause an accuracy issue with your logging manager, as the actual time of the event might be different from the time the log was written to the log file. Out of curiosity, what's the logging manager showing this behavior?

This could cause an accuracy issue with your logging manager, as the actual time of the event might be different from the time the log was written to the log file. Out of curiosity, what's the logging manager showing this behavior?
Author

The delay would only the time it takes the process manager to read the line off of stdout/stderr and to re-output it to stdout, which will be microseconds at most. I suppose if garage outputs a ton of logs all at the same time and the process manager gets backed up there could be a discrepancy, but personally I would be ok with that trade-off.

To be clear, I'm suggesting this as an option which can be enabled, not a default behavior.

Out of curiosity, what's the logging manager showing this behavior?

I would say that virtually every process manager out there prefixes log lines with the timestamp it received them, from systemd to supervisord to docker. For my specific use-case I'm using a custom manager I wrote myself, pmux, which is able to have timestamps prefixed to log lines as an option.

The delay would only the time it takes the process manager to read the line off of stdout/stderr and to re-output it to stdout, which will be microseconds at most. I suppose if garage outputs a ton of logs all at the same time and the process manager gets backed up there could be a discrepancy, but personally I would be ok with that trade-off. To be clear, I'm suggesting this as an option which can be enabled, not a default behavior. > Out of curiosity, what's the logging manager showing this behavior? I would say that virtually every process manager out there prefixes log lines with the timestamp it received them, from systemd to supervisord to docker. For my specific use-case I'm using a custom manager I wrote myself, [pmux](https://code.betamike.com/micropelago/pmux/), which is able to have timestamps prefixed to log lines as an option.
maximilien added the
action
discussion-needed
label 2024-11-02 22:59:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#894
No description provided.