Closed ironyman closed 7 years ago
Hi,
Thanks for taking the time to contribute to this project!
since now we will have both source
& appName
- it got me thinking maybe we need something more dynamic, maybe a new config object that will get merged into the output, WDYT?
Sure, so it would be used like this
log4js.configure({
appenders: {
out: {
type: 'console', layout: {
type: 'json',
static: {
appName: 'testapp',
source: 'development'
}
}
}
},
categories: { default: { appenders: ['out'], level: 'info' } }
});
Yeah exactly, so if it's provided we simple merge it onto the object.
On Sun, Aug 27, 2017 at 18:27 ironyman notifications@github.com wrote:
Sure, so it would be used like this
log4js.configure({ appenders: { out: { type: 'console', layout: { type: 'json', static: { appName: 'testapp', source: 'development' } } } }, categories: { default: { appenders: ['out'], level: 'info' } } });
— You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub https://github.com/id0Sch/log4js-json-layout/pull/3#issuecomment-325205238, or mute the thread https://github.com/notifications/unsubscribe-auth/AFl9RLBZ8ULxZLYxUBF_SVMFq2pfwqAxks5scYrVgaJpZM4PBmmV .
Great, I've already pushed the change (in case you didn't notice).
looks great, do you mind updating the README + add test case?
I left the mentions of source
option in the README. What do you think?
it will be used only for backwards compatibility, i think it's fine.
@ironyman published, it's available in version 2.1.0 thanks for you time! much appreciated 👏
Thank you.
We have multiple applications pushing logs to one log server and we'd like to differentiate between them in ElasticSearch queries.