adding custom function to bunyan logger
farhad-taran opened this issue · 0 comments
farhad-taran commented
is there any way of adding a custom function to the bunyan logger, either an extension method or using inheritance?
I am trying the following atm with no success and getting the following error:
Error:(9, 18) TS2339: Property 'debugInPlace' does not exist on type 'import("/Users/farhad/Source/lib-core/node_modules/@types/bunyan/index.d.ts")'.
import Logger from 'bunyan';
declare module 'bunyan' {
interface Logger {
debugInPlace(featureRole: string, ...params:any[]): void;
}
}
Logger.prototype.debugInPlace = function (this: Logger, featureRole: string, ...params:any[]) {
}