Skip to content

make the log_file name more predictable #9582

@shantanugadgil

Description

@shantanugadgil

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions