What about this? Any good?
NodeBB log files
-
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!