-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
I'd like to add custom field in logs collection, but it's not written in DB. Any suggestion?
const metaFormat = winston.format((info) => {
return { ...info, app: 'test' };
});
const transports = [
new winston.transports.MongoDB({
db: process.env.MONGODB_CONNECTION,
options: {
useUnifiedTopology: true,
},
collection: 'logs',
format: winston.format.combine(
metaFormat(),
winston.format.json(),
),
}),
]
Metadata
Metadata
Assignees
Labels
No labels