| 34 | } |
| 35 | |
| 36 | export class PinoLogger extends Disposable implements ILogService { |
| 37 | readonly _serviceBrand: undefined; |
| 38 | |
| 39 | constructor(private readonly logger: ServerLogger) { |
| 40 | super(); |
| 41 | } |
| 42 | |
| 43 | info(obj: object | string, msg?: string): void { |
| 44 | if (typeof obj === 'string') { |
| 45 | this.logger.info(obj); |
| 46 | return; |
| 47 | } |
| 48 | this.logger.info(obj, msg); |
| 49 | } |
| 50 | warn(obj: object | string, msg?: string): void { |
| 51 | if (typeof obj === 'string') { |
| 52 | this.logger.warn(obj); |
| 53 | return; |
| 54 | } |
| 55 | this.logger.warn(obj, msg); |
| 56 | } |
| 57 | error(obj: object | string, msg?: string): void { |
| 58 | if (typeof obj === 'string') { |
| 59 | this.logger.error(obj); |
| 60 | return; |
| 61 | } |
| 62 | this.logger.error(obj, msg); |
| 63 | } |
| 64 | debug(obj: object | string, msg?: string): void { |
| 65 | if (typeof obj === 'string') { |
| 66 | this.logger.debug(obj); |
| 67 | return; |
| 68 | } |
| 69 | this.logger.debug(obj, msg); |
| 70 | } |
| 71 | child(bindings: object): ILogService { |
| 72 | return new PinoLogger(this.logger.child(bindings)); |
| 73 | } |
| 74 | } |
nothing calls this directly
no outgoing calls
no test coverage detected