Skip to content

Commit

Permalink
Export ProxyLogger directly
Browse files Browse the repository at this point in the history
  • Loading branch information
jpwilliams committed Sep 25, 2023
1 parent f35922a commit 8f83265
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/inngest/etc/inngest.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,27 @@ export class NonRetriableError extends Error {
readonly cause?: unknown;
}

// @public
export class ProxyLogger implements Logger {
constructor(logger: Logger);
// (undocumented)
debug(...args: LogArg[]): void;
// (undocumented)
disable(): void;
// (undocumented)
enable(): void;
// (undocumented)
error(...args: LogArg[]): void;
// (undocumented)
flush(): Promise<void>;
// Warning: (ae-forgotten-export) The symbol "LogArg" needs to be exported by the entry point index.d.ts
//
// (undocumented)
info(...args: LogArg[]): void;
// (undocumented)
warn(...args: LogArg[]): void;
}

// @public
export enum queryKeys {
// (undocumented)
Expand Down
1 change: 1 addition & 0 deletions packages/inngest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type {
export { NonRetriableError } from "./components/NonRetriableError";
export { headerKeys, internalEvents, queryKeys } from "./helpers/consts";
export type { IsStringLiteral } from "./helpers/types";
export { ProxyLogger } from "./middleware/logger";
export type {
ClientOptions,
EventNameFromTrigger,
Expand Down
2 changes: 2 additions & 0 deletions packages/inngest/src/middleware/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export class DefaultLogger implements Logger {
* context, so it doesn't result in duplicated logging.
*
* And also attempt to allow enough time for the logger to flush all logs.
*
* @public
*/
export class ProxyLogger implements Logger {
readonly #logger: Logger;
Expand Down

0 comments on commit 8f83265

Please sign in to comment.