mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-27 21:20:03 +00:00
output plain text to syslog (#3985)
* output plain text to syslog (#3984) * fix lint warnings Co-authored-by: Hamish Moffatt <hamish@moffatt.id.au>
This commit is contained in:
co-authored by
Hamish Moffatt
parent
0d9ed11ceb
commit
f5e5c76ca9
+7
-1
@@ -82,7 +82,13 @@ if (output.includes('file')) {
|
||||
/* istanbul ignore next */
|
||||
if (output.includes('syslog')) {
|
||||
require('winston-syslog').Syslog;
|
||||
const options = {app_name: 'zigbee2mqtt', ...settings.get().advanced.log_syslog};
|
||||
const options = {
|
||||
app_name: 'zigbee2mqtt',
|
||||
format: winston.format.printf(/* istanbul ignore next */(info) => {
|
||||
return `${info.message}`;
|
||||
}),
|
||||
...settings.get().advanced.log_syslog,
|
||||
};
|
||||
if (options.hasOwnProperty('type')) options.type = options.type.toString();
|
||||
transportsToUse.push(new winston.transports.Syslog(options));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user