Configurable ZwaveJS log location #2166
Replies: 3 comments 3 replies
-
@justindthomas I would suggest to change store directory in order to store everything on that location and not onlly logs as most of writes also happens on cache files used by zwavejs and them are stored there too |
Beta Was this translation helpful? Give feedback.
-
An environment variable to override the default setting would be an easy, low-impact fix for advanced users. A more invasive workaround that doesn't require any software changes is to define the Z-Wave JS logging options yourself in Instead of: "zwave": {
"port": "/dev/zwave",
"commandsTimeout": 30,
"logLevel": "debug",
"logEnabled": true,
"securityKeys": {
"S2_Unauthenticated": ""
},
"deviceConfigPriorityDir": "/usr/src/app/store/config",
"logToFile": true,
"serverEnabled": true,
"enableSoftReset": true,
"enableStatistics": false,
"serverPort": 3000,
"disclaimerVersion": 1
} you can use the following: "zwave": {
"port": "/dev/zwave",
"commandsTimeout": 30,
"securityKeys": {
"S2_Unauthenticated": ""
},
"deviceConfigPriorityDir": "/usr/src/app/store/config",
"serverEnabled": true,
"enableSoftReset": true,
"enableStatistics": false,
"serverPort": 3000,
"disclaimerVersion": 1,
"options": {
"logConfig": {
"enabled": true,
"level": "debug",
"logToFile": true,
"filename": "/logs/zwavejs_%DATE%.log",
"forceConsole": true
}
}
} zwavejs2mqtt allows you to define Z-Wave JS options directly in the With the above settings, logs will be written to the container's volumes:
- ./store:/usr/src/app/store
- ./logs:/logs
- ./settings.json:/usr/src/app/store/settings.json Of course, by controlling the settings file you have the burden of keeping up with any new options that are available, or handling any changes to the config schema. |
Beta Was this translation helpful? Give feedback.
-
PR submitted here: #2174 |
Beta Was this translation helpful? Give feedback.
-
Would folks be interested in a PR if I added the ability to specify the ZwaveJS log location? I'm running
zwavejs2mqtt
on a dedicated Raspberry Pi with an SD card and I'd like to leave logging pretty noisy, but want to do it to a ramdisk to reduce writes on the SD card.I've never used Vue (I'm familiar with React) but it looks straightforward enough and I think I can get a PR in if folks would be open to the change.
Beta Was this translation helpful? Give feedback.
All reactions