You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This changes the logger option provided to `reviewPullRequest()` and `createPullRequest()` to be a custom `Logger` interface that `code-suggester` declares:
```ts
interface LogFn {
/* eslint-disable @typescript-eslint/no-explicit-any */
<T extends object>(obj: T, msg?: string, ...args: any[]): void;
(msg: string, ...args: any[]): void;
/* eslint-enable @typescript-eslint/no-explicit-any */
}
export interface Logger {
error: LogFn;
warn: LogFn;
info: LogFn;
debug: LogFn;
trace: LogFn;
}
```
* This logger interface can be fulfilled by a default `Pino` logger as well as plain old `console`.
* We now default the logger to a null implementation to keep output to a minimum while allowing for a custom logger if you want output.
* We can drop the `pino` dependency as we now provide a null default logger implementation.
Fixes#178Fixes#183
We currently default to a pino logger that outputs JSON compatible with GCP logging.
For integrations like CLI's that use code-suggester, we might want to log with something more CLI friendly.
The text was updated successfully, but these errors were encountered: