Skip to content

Commit

Permalink
fix: create a new instance of logger in every log
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Dec 6, 2021
1 parent ea621ca commit 197bcfc
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/Log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ export class Log {
return Logger.formatters
}

static changeDefaultChannel(channel: string): typeof Log {
this.logger.changeDefaultChannel(channel)

return this
}

static channel(channel: string): typeof Log {
this.logger.channel(channel)

Expand All @@ -48,25 +42,37 @@ export class Log {

static log(message: any, options?: any) {
this.logger.log(message, options)

this.logger = new Logger()
}

static info(message: any, options?: any) {
this.logger.info(message, options)

this.logger = new Logger()
}

static warn(message: any, options?: any) {
this.logger.warn(message, options)

this.logger = new Logger()
}

static error(message: any, options?: any) {
this.logger.error(message, options)

this.logger = new Logger()
}

static debug(message: any, options?: any) {
this.logger.debug(message, options)

this.logger = new Logger()
}

static success(message: any, options?: any) {
this.logger.success(message, options)

this.logger = new Logger()
}
}

0 comments on commit 197bcfc

Please sign in to comment.