Open epatpol opened 6 years ago
Could we consider to have flexible bunyan configuration file. So it will allow to specify default logger settings, like level and which stream should be used, as well override them for child loggers.
Updated The issue for the conf file in bunyan: https://github.com/trentm/node-bunyan/issues/585 https://github.com/trentm/node-bunyan/issues/153 suggesting to use JSON as a conf file
We could use JS file exporting bunyan logger options as a conf file. It will allow any kind of configurations supported by bunyan. Something like here but supporting child loggers as well.
Nice, if it was directly supported in bunyan that would indeed save us some trouble of having to manage that configuration file ourself. The JS file exporting the options isn't a bad idea either.
VS code saves (under linux) the different log files
exthost.log
,main.log
,renderer.log
,sharedprocess.log
under~/.config/Code/logs/YYYYMMDDT?????
. I still haven't figured out the exact format they use, but I think it would be nice if we did something similar. It could be a CLI argument to enable it and specify a path. It's not really useful when developping Theia as you can usually just scroll back a few lines to see what the logs were, but in the case of a backend that could have been running for weeks it makes sense to be able to easily fetch that.Note that this wouldn't be a big change, as bunyan supports having multiple streams (so we could still keep the standard output logs).