[bug] Driver logs are not pushed on main STDOUT/STDERR
See original GitHub issueWe face an issue with the zwave-js Driver logs. When running the command in our Shell, we can see all logs from zwavejs2mqtt and zwave-js driver in console. Once we run a Docker container OR push stdout/stderr logs to a file, Driver logs missing
Testing this: Console output:
β― node bin/www
______ _ ___ _ _
|___ / (_) |__ \ | | | |
/ /_ ____ ___ _____ _ ___ ) |_ __ ___ __ _| |_| |_
/ /\ \ /\ / / _` \ \ / / _ \ / __| / /| '_ ` _ \ / _` | __| __|
/ /__\ V V / (_| |\ V / __/ \__ \/ /_| | | | | | (_| | |_| |_
/_____|\_/\_/ \__,_| \_/ \___| |___/____|_| |_| |_|\__, |\__|\__|
_/ | | |
|__/ |_|
2020-12-17 19:49:14.791 WARN STORE: scenes.json not found
2020-12-17 19:49:14.793 WARN STORE: nodes.json not found
2020-12-17 19:49:15.172 INFO APP: Version: 1.0.0-alpha.0.023fccf
2020-12-17 19:49:15.173 INFO APP: Application path:/home/billias/ongit/zwavejs2mqtt
2020-12-17 19:49:15.218 INFO MQTT: Connecting to mqtt://mqtt.data:1883
2020-12-17 19:49:15.255 INFO ZWAVE: Connecting to /dev/ttyACM0
19:49:15.257 DRIVER ββββββββ βββ βββ ββββββ βββ βββ ββββββββ βββ ββββββββ
ββββββββ βββ βββ ββββββββ βββ βββ ββββββββ βββ ββββββββ
βββββ βββ ββ βββ ββββββββ βββ βββ ββββββ ββββββ βββ ββββββββ
βββββ ββββββββββ ββββββββ ββββ ββββ ββββββ ββββββ ββ βββ ββββββββ
ββββββββ ββββββββββ βββ βββ βββββββ ββββββββ ββββββββ ββββββββ
ββββββββ ββββββββ βββ βββ βββββ ββββββββ ββββββ ββββββββ
19:49:15.258 DRIVER version 5.5.0
19:49:15.258 DRIVER
19:49:15.258 DRIVER starting driver...
19:49:15.267 DRIVER Send queue: (empty) (0 messages)
19:49:15.267 DRIVER send thread state: idle
19:49:15.268 DRIVER opening serial port /dev/ttyACM0
2020-12-17 19:49:15.273 INFO APP: Listening on port 8091
2020-12-17 19:49:15.274 INFO MQTT: getaddrinfo ENOTFOUND mqtt.data mqtt.data:1883
2020-12-17 19:49:15.276 INFO MQTT: MQTT client offline
2020-12-17 19:49:15.277 INFO MQTT: MQTT client closed
19:49:15.277 DRIVER serial port errored: Error: No such file or directory, cannot open /dev/ttyACM
0
19:49:15.278 DRIVER destroying driver instance...
19:49:15.279 DRIVER destroying driver instance...
2020-12-17 19:49:15.279 INFO ZWAVE: Driver: Error: No such file or directory, cannot open /dev/ttyACM0
2020-12-17 19:49:15.280 WARN ZWAVE: Retry connection in 3 seconds...
^C2020-12-17 19:49:16.041 INFO APP: Closing clients...
2020-12-17 19:49:16.042 INFO GATEWAY: Closing Gateway...
19:49:16.043 DRIVER destroying driver instance...
Pushing STDOUT to a file (like docker does)
β― node bin/www 1>a 2>b
^C%
β― cat a
______ _ ___ _ _
|___ / (_) |__ \ | | | |
/ /_ ____ ___ _____ _ ___ ) |_ __ ___ __ _| |_| |_
/ /\ \ /\ / / _` \ \ / / _ \ / __| / /| '_ ` _ \ / _` | __| __|
/ /__\ V V / (_| |\ V / __/ \__ \/ /_| | | | | | (_| | |_| |_
/_____|\_/\_/ \__,_| \_/ \___| |___/____|_| |_| |_|\__, |\__|\__|
_/ | | |
|__/ |_|
2020-12-17 19:48:37.324 WARN STORE: scenes.json not found
2020-12-17 19:48:37.325 WARN STORE: nodes.json not found
2020-12-17 19:48:37.694 INFO APP: Version: 1.0.0-alpha.0.023fccf
2020-12-17 19:48:37.695 INFO APP: Application path:/home/billias/ongit/zwavejs2mqtt
2020-12-17 19:48:37.735 INFO MQTT: Connecting to mqtt://mqtt.data:1883
2020-12-17 19:48:37.769 INFO ZWAVE: Connecting to /dev/ttyACM0
2020-12-17 19:48:37.780 INFO APP: Listening on port 8091
2020-12-17 19:48:37.781 INFO MQTT: getaddrinfo ENOTFOUND mqtt.data mqtt.data:1883
2020-12-17 19:48:37.783 INFO MQTT: MQTT client offline
2020-12-17 19:48:37.783 INFO MQTT: MQTT client closed
2020-12-17 19:48:37.784 INFO ZWAVE: Driver: Error: No such file or directory, cannot open /dev/ttyACM0
2020-12-17 19:48:37.784 WARN ZWAVE: Retry connection in 3 seconds...
2020-12-17 19:48:38.392 INFO APP: Closing clients...
2020-12-17 19:48:38.394 INFO GATEWAY: Closing Gateway...
β― cat b
b file is STDERR and is empty
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Nomad stops streaming Docker stderr/stdout logs to ... - GitHub
I seem to be seeing this behaviour as well. I'm not sure how to correlate logmon and docker_logger to the respective containers but...
Read more >Confused about stdin, stdout and stderr? - Stack Overflow
Most programs need to read input, write output, and log errors, so stdin ... When opened the standard error stream is not fully...
Read more >Cluster-level Logging in Kubernetes with Fluentd - Medium
Docker containers in Kubernetes write logs to standard output ( stdout ) and standard ( stderr ) error streams. Docker redirects these streamsΒ ......
Read more >Where Are Docker Container Logs Stored? - Sematext
I strongly recommend not changing the log driver! Let's start debugging. First of all, to list all running containers, use the docker ps...
Read more >Databricks Cluster Logs Driver stdout - delayed in dbfs location
Every time, the UI shows me the stdout information very quickly but when I try to read the same from dbfs location, it's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would it give us also possibility to push logs without tty? If thsi is easy to add as option, might worth! more people move to containers, and the load on cpu (for more power systems like rPi4) can be helpful during debugging
File can be worst than stdout, due to more load on system. Ofcourse you could assume we can redirect file to stdout. but still hacky way.
Could you please try changes a) and/or b) and see if it changes things?
Open
packages\zwave-js\src\lib\log\Driver.ts
a) in lines 33, 34, 39 replace
"driver"
with a different keyb) in line 27, change the loglevel from
"verbose"
to"debug"
or"info"
.Compile and link the packages, as described here