Skip to content

Commit

Permalink
Update the import
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Feb 13, 2024
1 parent 1316089 commit 09cd7e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/logger/src/winston.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// We want to keep `winston` export as it's more readable and easier to understand
// eslint-disable-next-line import/no-named-as-default-member
import winston, {createLogger} from "winston";
import winston, {createLogger as winstonCreateLogger} from "winston";
import type {Logger as Winston} from "winston";
import {Logger, LoggerOptions, LogLevel, logLevelNum} from "./interface.js";
import {getFormat} from "./utils/format.js";
Expand Down Expand Up @@ -48,7 +48,7 @@ export class WinstonLogger implements Logger {
static createWinstonInstance(options: Partial<LoggerOptions> = {}, transports?: winston.transport[]): Winston {
const defaultMeta: DefaultMeta = {module: options?.module || ""};

return createLogger({
return winstonCreateLogger({
// Do not set level at the logger level. Always control by Transport, unless for testLogger
level: options.level,
defaultMeta,
Expand Down

0 comments on commit 09cd7e9

Please sign in to comment.