diff --git a/.changeset/modern-cats-smoke.md b/.changeset/modern-cats-smoke.md new file mode 100644 index 000000000..0142dbaac --- /dev/null +++ b/.changeset/modern-cats-smoke.md @@ -0,0 +1,5 @@ +--- +"@layerzerolabs/io-devtools": patch +--- + +Reexport Logger type diff --git a/packages/io-devtools/src/stdio/logger.ts b/packages/io-devtools/src/stdio/logger.ts index 494deac5a..8d9d1bac9 100644 --- a/packages/io-devtools/src/stdio/logger.ts +++ b/packages/io-devtools/src/stdio/logger.ts @@ -1,5 +1,10 @@ import type { Format } from 'logform' -import { createLogger as createWinstonLogger, format, transports, Logger } from 'winston' +import { createLogger as createWinstonLogger, format, transports, type Logger } from 'winston' + +/** + * Re-export for ease of use + */ +export { type Logger } from 'winston' /** * Valid logging levels @@ -49,7 +54,7 @@ export const setDefaultLogLevel = (level: string) => { * * @returns `Logger` */ -export const createLogger = (level: string = DEFAULT_LOG_LEVEL, logFormat: Format = format.cli()) => +export const createLogger = (level: string = DEFAULT_LOG_LEVEL, logFormat: Format = format.cli()): Logger => createWinstonLogger({ level, format: logFormat,