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

Log file naming after rotation #6852

Closed
Masterz69 opened this issue Mar 27, 2021 · 1 comment
Closed

Log file naming after rotation #6852

Masterz69 opened this issue Mar 27, 2021 · 1 comment
Labels
problem Something isn't working

Comments

@Masterz69
Copy link

What happened

As far I see log rotation happened and after that they have following names:

log_2021-03-14.15-31-13.txt
log_2021-03-14.15-31-131.txt

image

What did you expect to happen

IMHO some divider to be put, like: log_2021-03-14.15-31-13.1.txt or log_2021-03-14.15-31-13_1.txt

How to reproduce it (minimal and precise)

Debug info

info 2021-03-14 15:31:14: Logging to console and directory: '/config/zigbee2mqtt/log' filename: log_2021-03-14.15-31-13.txt
info 2021-03-14 15:31:14: Starting Zigbee2MQTT version 1.18.1 (commit #1.18.1)
info 2021-03-14 15:31:14: Starting zigbee-herdsman (0.13.71)
info 2021-03-14 15:31:17: zigbee-herdsman started
info 2021-03-14 15:31:17: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20200921,"transportrev":2},"type":"zStack3x0"}'

@Masterz69 Masterz69 added the problem Something isn't working label Mar 27, 2021
@Koenkk
Copy link
Owner

Koenkk commented Mar 27, 2021

Zigbee2MQTT uses winston for logging, I've checked the docs (https://github.com/winstonjs/winston/blob/master/docs/transports.md#file-transport) but it seems they don't allow to specify any postfix divider. You can add this yourself by adding the following to your configuration.yaml

advanced:
  log_file: 'log_%TIMESTAMP%_.txt'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants