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

make the log_file name more predictable #9582

Closed
shantanugadgil opened this issue Dec 9, 2020 · 4 comments
Closed

make the log_file name more predictable #9582

shantanugadgil opened this issue Dec 9, 2020 · 4 comments
Labels
help-wanted We encourage community PRs for these issues! theme/logging type/enhancement

Comments

@shantanugadgil
Copy link
Contributor

Nomad version

Nomad v1.0.0 (cfca640)

Operating system and Environment details

CentOS 7/8, Ubuntu 16/18

Issue

The added timestamp to the log file makes it difficult to follow file using the usual method of tail -F <filename>
(notice the capital F, follows new file with same name)
https://www.nomadproject.io/docs/configuration#log_file

Can the log rotation be done more like messages (or syslog on Ubuntu)?

Reproduction steps

The current logs look like:

$ ls -1 $PWD/nomad*
/var/log/nomad-1607009339938568007.log
/var/log/nomad-1607065826532980325.log
/var/log/nomad-1607065989065965514.log
/var/log/nomad-1607175963299036868.log
/var/log/nomad-1607337076293820562.log
/var/log/nomad-1607451328040554954.log
/var/log/nomad-1607451329497221903.log
/var/log/nomad-1607451873201851781.log

I wish they would look more like:

$ ls -1 $PWD/messages*
/var/log/messages
/var/log/messages-20201115
/var/log/messages-20201122
/var/log/messages-20201129
/var/log/messages-20201206

... where I can keep following a single file.

Job file (if appropriate)

n/a

Nomad Client logs (if appropriate)

n/a

Nomad Server logs (if appropriate)

n/a

@tgross
Copy link
Member

tgross commented Dec 9, 2020

This would definitely be more "typical unix" behavior and more logrotate-friendly... I imagine most users are sending their logs to journald but that doesn't mean we shouldn't improve the log-to-file situation.

@lgfa29
Copy link
Contributor

lgfa29 commented Aug 23, 2021

Closed by #11070

@lgfa29 lgfa29 closed this as completed Aug 23, 2021
@shantanugadgil
Copy link
Contributor Author

@lgfa29 This is indeed a very welcome change, thanks!!! ✋

@Amier3 Amier3 added the help-wanted We encourage community PRs for these issues! label Apr 1, 2022
@github-actions
Copy link

github-actions bot commented Oct 9, 2022

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help-wanted We encourage community PRs for these issues! theme/logging type/enhancement
Projects
None yet
Development

No branches or pull requests

4 participants