Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: cleanup custom logging (#206)
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 #178 Fixes #183
- Loading branch information
Showing
7 changed files
with
34 additions
and
106 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters