Closed chungmanau closed 3 years ago
Hey Simon, you can override these fields with the custom field logic: log.info("test override", {"layer":"test-layer", "logger":"test-logger"});
The awnser provided should provide a solution to this problem, and is already supported by our library in an acceptable way. I closed this issue for this reason.
Hi, Could be useful to document this, if you need I can prepare and send a PR. Regards, Sam
Hi Sam, I will document this in an upcoming version. I have some more changes to do in the pipeline, so I will then also add this feature. Thanks for offering your help :) Regards, Nicklas
Hi,
I had a CF nodejs application and binds it to the application log services.
// sample code const logger = require('cf-nodejs-logging-support'); logger.error('some message');
In Kibana Application Log, I can see msg: 'some message' which is good. However some properties are hard-coded such as logger: 'nodejs-logger' and layer: '[NODEJS]'. They are pre-set in config.js.
Is there any way I can overwrite those hard-coded values, or the library exposes API to set them?
Regards, Simon