Hi Team,
I have created a node js code where I created a bunyan logger class consist of a constructor that returns the logger in below format -
public logger: any
constructor (serviceName: string) {
this.logger = bunyan.createLogger(
name: serviceName,
serializers: bunyan.stdSerializers,
streams: [
{stream: process.stdout, level: 'info'},
{stream: process.stderr, level: 'error'}
],
return this.logger;
});
Later using this logger iam trying to log custom logs. I want to pass these bunyan logs generated in my application to Kibana dashboard. How ever when i use elastic_apm_node.start() options and in the logger value i give this parameter logger : this.logger, but these bunyan logs are not transfered to kibana. The traces are visible in service part of APM in kibana dasboard but what i wanted to acheive is these bunyan logs from application getting reflected in kibana
Please help me
Iam able to see the traces etc, but i would also like to see the bunyan logs reflecting in my kibana dasboard.
The default logger used in elastic_apm_node i can see is pino, but i dont think this should cause any issue in picking the bunyan logs into the streams in kibana