Skip to content

Commit

Permalink
🧹 Re-export Logger type from io-devtools (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista authored Jan 5, 2024
1 parent 7d61db6 commit e0be8b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-cats-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@layerzerolabs/io-devtools": patch
---

Reexport Logger type
9 changes: 7 additions & 2 deletions packages/io-devtools/src/stdio/logger.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e0be8b7

Please sign in to comment.