Question

I have a web service implemented by Node.js. Currently I'm using log4js to write the log to the file.

I want to use the MongoDB for log centralization. There is no mongodb appender in the log4js. I googled somewhere. Unfortunately, I didn't find the corresponding mongodb appender. Is there any log package which supports mongodb?

Thanks,

Jeffrey

== UPDATE ==

I find https://github.com/baryon/tracer supports to log to MongoDB. Besides it, anyone else?

Was it helpful?

Solution

Winston supports MongoDB and quite a few other "storages".

It allows you to log to a different "storage" based on the log level and even create your own "storage" by implementing a log() method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top