Skip to content

Commit

Permalink
Merge pull request #1304 from log4js-node/1292-inconsistency-regardin…
Browse files Browse the repository at this point in the history
…g-configure-signature-of-appendermodule-with-typescript

type: corrected AppenderModule interface and Recording interface
  • Loading branch information
lamweili committed Jul 26, 2022
2 parents 0c37f40 + 387e712 commit 96e305a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions types/log4js.d.ts
Expand Up @@ -335,7 +335,12 @@ export interface Appenders {
}

export interface AppenderModule {
configure: (config: Config, layouts: LayoutsParam) => AppenderFunction;
configure: (
config?: Config,
layouts?: LayoutsParam,
findAppender?: () => AppenderFunction,
levels?: Levels
) => AppenderFunction;
}

export type AppenderFunction = (loggingEvent: LoggingEvent) => void;
Expand Down Expand Up @@ -395,7 +400,7 @@ export interface Configuration {
}

export interface Recording {
configure(loggingEvent: LoggingEvent): void;
configure(): AppenderFunction;
replay(): LoggingEvent[];
playback(): LoggingEvent[];
reset(): void;
Expand Down

0 comments on commit 96e305a

Please sign in to comment.