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

syslog output is JSON rather than plain text #3984

Closed
hmoffatt opened this issue Jul 27, 2020 · 1 comment · Fixed by #3985
Closed

syslog output is JSON rather than plain text #3984

hmoffatt opened this issue Jul 27, 2020 · 1 comment · Fixed by #3985

Comments

@hmoffatt
Copy link
Contributor

Bug Report

What happened

The syslog output is JSON rather than plain text. This is discussed in #3647, but that is closed without any solution to this aspect.

Jul 27 09:56:26 localhost zigbee2mqtt[8811]: {"message":"MQTT publish: topic 'homeassistant/sensor/0x00178801080bbff9/action/config', payload '{\"icon\":\"mdi:gesture-double-tap\",\"value_template\":\"{{ value_json.action }}\",\"state_topic\":\"zigbee2mqtt/0x00178801080bbff9\",\"json_attributes_topic\":\"zigbee2mqtt/0x00178801080bbff9\",\"name\":\"0x00178801080bbff9_action\",\"unique_id\":\"0x00178801080bbff9_action_zigbee2mqtt\",\"device\":{\"identifiers\":[\"zigbee2mqtt_0x00178801080bbff9\"],\"name\":\"0x00178801080bbff9\",\"sw_version\":\"Zigbee2mqtt 1.14.2\",\"model\":\"Hue dimmer switch (324131092621)\",\"manufacturer\":\"Philips\"},\"availability_topic\":\"zigbee2mqtt/0x00178801080bbff9/availability\"}'","level":"info"}

What did you expect to happen

Plain text is sent to the syslog daemon, like the console messages:

MQTT publish: topic 'zigbee2mqtt/0x00178801080bbff9/availability', payload 'online'

How to reproduce it (minimal and precise)

Configure with:

advanced:
  log_output:
    - syslog
  log_syslog:
    protocol: udp4
    port: 514
    type: bsd

Debug Info

Zigbee2mqtt version: 1.14.2

hmoffatt added a commit to hmoffatt/zigbee2mqtt that referenced this issue Jul 27, 2020
Koenkk pushed a commit that referenced this issue Jul 27, 2020
* output plain text to syslog (#3984)

* fix lint warnings

Co-authored-by: Hamish Moffatt <hamish@moffatt.id.au>
@Koenkk
Copy link
Owner

Koenkk commented Jul 27, 2020

Merged, thanks!

@Koenkk Koenkk closed this as completed Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants