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
I'm using this as a library in a bot. When running locally via the CLI, it's outputting structured logs. For the GitHub Action portion of this, that may make sense. But for a server-side library, it should integrate with the existing logging subsystem.
The text was updated successfully, but these errors were encountered:
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
I'm using this as a library in a bot. When running locally via the CLI, it's outputting structured logs. For the GitHub Action portion of this, that may make sense. But for a server-side library, it should integrate with the existing logging subsystem.
The text was updated successfully, but these errors were encountered: