bunyan-mongodb
v1.2.3
Published
MongoDB Stream to Bunyan Logger
Downloads
237
Readme
bunyan-mongodb
Mongodb stream for bunyan logger / other uses
Usage example:
const bunyan = require("bunyan");
const bunyanMongo = require("bunyan-mongodb");
const logger = bunyan.createLogger({
name: "Logger Name",
streams: [
{
level: bunyan.INFO,
stream: bunyanMongo({
host: "localhost",
database: "example",
collection: "log",
username: "user", // Optional
password: "pwd", // Optional
authDatabase: "admin", // Optional
batchSize: 100,
})
},
],
});