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: hide timestamp by default #3358

Open
532910 opened this issue Mar 18, 2024 · 7 comments
Open

logs: hide timestamp by default #3358

532910 opened this issue Mar 18, 2024 · 7 comments
Labels
config Configuration format update or breaking change enhancement Improving existing functionality help wanted Extra attention is needed I3 Minimal impact S4 Routine U4 Nothing urgent
Milestone

Comments

@532910
Copy link

532910 commented Mar 18, 2024

while prepending log lines with timestamp may be a good feature, it must be disabled by default, the same way as all other programs do

@532910 532910 added bug Something isn't working U2 Seriously planned labels Mar 18, 2024
@AnnaShaleva AnnaShaleva added I3 Minimal impact U4 Nothing urgent S4 Routine config Configuration format update or breaking change and removed bug Something isn't working U2 Seriously planned labels Mar 18, 2024
@AnnaShaleva AnnaShaleva added this to the v0.107.0 milestone Mar 18, 2024
@AnnaShaleva
Copy link
Member

An option should be added, but it's under discussion whether to enable this option by default. To me, it should be explicitly enabled by the node user if needed, otherwise the original behaviour should be preserved.

@roman-khimov roman-khimov added the enhancement Improving existing functionality label Mar 18, 2024
@532910
Copy link
Author

532910 commented Mar 18, 2024

it's ok with controlling terminal, otherwise — no

@532910
Copy link
Author

532910 commented Mar 18, 2024

It's ok to print timestamp by default, if the program is intended for developers.
In case it's intended for users -- the default should be not to show timestamps.

@roman-khimov
Copy link
Member

void syslog(int priority, const char *format, ...); suggests that time is not something app should manage, but it's not often used these days. Current standard way to handle logging is to just print things to stdout and let journald handle it. Developers love stdout as well, so there is a conflict. Checking tty for it is an interesting proposal, but I'm not sure everyone would like it. More opinions on defaults/autodetection are welcome.

@roman-khimov roman-khimov added the help wanted Extra attention is needed label Mar 21, 2024
@EESergey
Copy link

Advanced logging with application timestamps can be output in debug mode. By default, debugging mode should be disabled. As an option, enable debugging mode depending on the application version; it will be enabled on pre-release versions.

@532910
Copy link
Author

532910 commented May 23, 2024

I would not like to receive additional timestamps when enabling debug logging.
It should be a separate control or presence of controlling terminal.

@roman-khimov
Copy link
Member

Level is orthogonal to format. For now I tend to think that tty magic is the best way to handle the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Configuration format update or breaking change enhancement Improving existing functionality help wanted Extra attention is needed I3 Minimal impact S4 Routine U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

4 participants