Open cramhead opened 4 years ago
Temporary solution:
class LogBunyan {
constructor(
private logger: Logger,
) {
}
child() {
return ({
log: (...args: any[]) => this.logger.log(args.join(', ')),
debug: (...args: any[]) => this.logger.debug(args.join(', ')),
error: (...args: any[]) => this.logger.error(args.join(', ')),
warn: (...args: any[]) => this.logger.warn(args.join(', ')),
info: (...args: any[]) => this.logger.log(args.join(', ')),
});
}
}
new KafkaPubSub({
topic,
host,
port,
groupId,
logger: new LogBunyan(logger) as unknown as BunyanLogger,
globalConfig: {},
});
how can I use my own log into graphql-kafka-subscriptions ?
Thanks for making this package. I think it's really great.
I notice that logger method used are only debug, warn, info, and error, but when I pass my logger that supports those function I get the following.
It's problematic to support all the interfaces that bunyan offers.