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
events.login the root are older, and should be moved into
There shouldn't be any conflict -- feel free to make an issue on GH re: this.
error.log and events.log are still outside the logs directory. Running NodeBB 0.4.0.
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.
Sounds like a good idea. It'd be great to have all the logs in one place/format and a user-friendly tool with which to view them. Are you thinking of something like node-bunyan?
@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 most likely a lot of it would get removed. This new logging would replace all existing stuff (including winston)
Removing winston would be tricky, as plugins rely on it as well. You can replace it throughout core, although you'll have to leave it in place for plugins, until it gets deprecated in v0.5.0 at the earliest.
@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.
@miksago Besides that, you should be good to go, please keep us apprised of your progress!