Proposal
Before #11070, logs of the Nomad agent were rotated on restart, given a client configuration like this:
log_file = "/tmp/log/"
log_rotate_max_files = 7
Starting from v1.1.4, the active log file is simply overwritten (its only rotated if the specified size/number of log files are exceeded).
This makes debugging problems a bit harder locally, I propose enabling log rotation of the active file on client startup as well (not sure if this should be the default or if its should be an opt-in behaviour).
Note: I'm not sure if this is the intended behaviour since this use-case is not clearly documented (hence I tagged this as a feature request instead of a bug).
Use-cases
Keeping logs for the last few client runs helps with debugging. I usually ssh into the node where the client is running if something really goes south, iterating on possible fixes while checking both the active and previous log files on the local filesystem (instead of checking a global log collector which is usually slower).
Proposal
Before #11070, logs of the Nomad agent were rotated on restart, given a client configuration like this:
Starting from
v1.1.4, the active log file is simply overwritten (its only rotated if the specified size/number of log files are exceeded).This makes debugging problems a bit harder locally, I propose enabling log rotation of the active file on client startup as well (not sure if this should be the default or if its should be an opt-in behaviour).
Note: I'm not sure if this is the intended behaviour since this use-case is not clearly documented (hence I tagged this as a feature request instead of a bug).
Use-cases
Keeping logs for the last few client runs helps with debugging. I usually
sshinto the node where the client is running if something really goes south, iterating on possible fixes while checking both the active and previous log files on the local filesystem (instead of checking a global log collector which is usually slower).