Merge pull request #1304 from log4js-node/1292-inconsistency-regarding-configure-signature-of-appendermodule-with-typescript

type: corrected AppenderModule interface and Recording interface
This commit is contained in:
Lam Wei Li 2022-07-26 15:59:08 +08:00 committed by GitHub
commit 96e305a8eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
types/log4js.d.ts vendored
View File

@ -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;
@ -395,7 +400,7 @@ export interface Configuration {
}
export interface Recording {
configure(loggingEvent: LoggingEvent): void;
configure(): AppenderFunction;
replay(): LoggingEvent[];
playback(): LoggingEvent[];
reset(): void;