MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / PinoLogger

Class PinoLogger

packages/server/src/services/pinoLoggerService.ts:36–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected