NodeBB log files
-
I've observed that there is an empty logs directory in the root of a NodeBB installation. What log files are supposed to be in that directory?
And I can also see an error.log and an events.log file. Wouldn't it be better to move both files to the empty logs directory?
-
When you run NodeBB via
./nodebb start
, script output is sent to a file in/logs/output.log
.error.log
andevents.log
in the root are older, and should be moved into/logs
(@baris)There shouldn't be any conflict -- feel free to make an issue on GH re: this.
-
error.log and events.log should be moved into the /logs folder · Issue #1321 · NodeBB/NodeBB
See here: http://github.com/designcreateplay/NodeBB
GitHub (github.com)
-
There was a motion by me to refactor all of the logging. If I were to do that, it'd be done with Bunyan most likely, such that all logs are In one format, even if they include more data than other sources (http and websocket combined).
This'd be a fair chunk of work. I might start experimenting on this soon.
-
@planner yup, node-bunyan exactly. Most likely I'll need to come up with a custom format for WebSocket logs, perhaps it'd make sense to split it further though:
- http request / response
- websocket open / close
- api calls
- platform events
As probably 40% of the information in a websocket data event is pointless to the end-user, and only marginally helpful to the developers of nodebb.
-
@julian aye, for that, I could write a custom Winston transport to use, which just pumps JSON directly out to Bunyan. That way all logs would still be in JSON format, no matter where they originally came from.
Firstly, however, I'd be revamping the core logging.