No matter what log file name I pass Consul always just creates log files named
example:
/usr/local/bin/consul agent -config-dir /etc/consul -log-file='/var/log/consul/consul.log'
generates:
/var/log/consul# ls
consul-1537395014138763084.log
and
/usr/local/bin/consul agent -config-dir /etc/consul -log-file='/var/log/consul/consultest.log'
generates:
consultest-1537398275310124337.log
Is it intentional that a timestamp is always appended to our logs? This is not clear in the documentation as it states 'In case the path doesn't have the filename, the filename defaults to Consul-timestamp.log . '
Hey @pdroz . This is indeed the behavior for the log files. The filename you provide gets the timestamp appended to. If you don't give a filename, the default filename would be Consul. And this gets the timestamp added at the end of a write/ create file operation. Hope this resolves your confusion.
I made a small PR to clarify the format of this file. Thanks!
Hi @MagnumOpus21 , is it possibly to set log name without timestamp?
Why on earth would you decide for user the log file name format? They can use logrotate to rotate the logs in whatever way they wish and use syslog along with logging daemon to spit custom filenames.
Hey there,
This issue has been automatically locked because it is closed and there hasn't been any activity for at least _30_ days.
If you are still experiencing problems, or still have questions, feel free to open a new one :+1:.
Most helpful comment
Hi @MagnumOpus21 , is it possibly to set log name without timestamp?