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

Timestamps in Console and Syslog logs are shown in different timezones #9905

Closed
IgorAga opened this issue Nov 30, 2021 · 2 comments
Closed
Labels
problem Something isn't working stale Stale issues

Comments

@IgorAga
Copy link

IgorAga commented Nov 30, 2021

Timestamp in Console log output is shown in local timezone (UTC+3):

Zigbee2MQTT:info 2021-11-29 09:40:40: Logging to console only'
Zigbee2MQTT:info 2021-11-29 09:40:41: Starting Zigbee2MQTT version 1.22.0 (commit #df0543d4)
Zigbee2MQTT:info 2021-11-29 09:40:41: Starting zigbee-herdsman (0.13.164)

while the same log entries in Syslog are shown in UTC:

Nov 29 06:40:40 192.168.0.2 zigbee2mqtt Logging to console only'
Nov 29 06:40:41 192.168.0.2 zigbee2mqtt Starting Zigbee2MQTT version 1.22.0 (commit #df0543d4)
Nov 29 06:40:41 192.168.0.2 zigbee2mqtt Starting zigbee-herdsman (0.13.164)

Log config is as following:

  log_level: debug
  log_output: ['console', 'syslog']
  log_syslog:
    app_name: zigbee2mqtt
    host: 192.168.0.6
    localhost: 192.168.0.2
    pid: process.pid
    port: 514
    protocol: udp4
    type: '5424'
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Dec 31, 2021
@github-actions github-actions bot closed this as completed Jan 7, 2022
@WobwobRt
Copy link

WobwobRt commented Mar 1, 2024

Timestamp in Console log output is shown in local timezone (UTC+3):

Zigbee2MQTT:info 2021-11-29 09:40:40: Logging to console only'
Zigbee2MQTT:info 2021-11-29 09:40:41: Starting Zigbee2MQTT version 1.22.0 (commit #df0543d4)
Zigbee2MQTT:info 2021-11-29 09:40:41: Starting zigbee-herdsman (0.13.164)

while the same log entries in Syslog are shown in UTC:

Nov 29 06:40:40 192.168.0.2 zigbee2mqtt Logging to console only'
Nov 29 06:40:41 192.168.0.2 zigbee2mqtt Starting Zigbee2MQTT version 1.22.0 (commit #df0543d4)
Nov 29 06:40:41 192.168.0.2 zigbee2mqtt Starting zigbee-herdsman (0.13.164)

Log config is as following:

  log_level: debug
  log_output: ['console', 'syslog']
  log_syslog:
    app_name: zigbee2mqtt
    host: 192.168.0.6
    localhost: 192.168.0.2
    pid: process.pid
    port: 514
    protocol: udp4
    type: '5424'

You can fix this by using a fork of glossy: winstonjs/winston-syslog#139

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

No branches or pull requests

2 participants