Skip to content

Commit

Permalink
fix: logger build (#779)
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 authored Dec 29, 2020
1 parent 5f20d82 commit ee3589e
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/logger/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ export class MidwayBaseLogger extends EmptyLogger {
this.add(new EmptyTransport());
}

// @ts-ignore
log(...args) {
super.log.apply(this, args);
}

disableConsole() {
this.remove(this.consoleTransport);
}
Expand All @@ -82,8 +77,8 @@ export class MidwayBaseLogger extends EmptyLogger {
filename: this.loggerOptions.fileLogName,
datePattern: 'YYYY-MM-DD',
level: this.loggerOptions.fileLevel || this.loggerOptions.level || 'silly',
createSymlink: true,
symlinkName: this.loggerOptions.disableFileSymlink ? undefined: this.loggerOptions.fileLogName,
createSymlink: this.loggerOptions.disableFileSymlink !== true,
symlinkName: this.loggerOptions.fileLogName,
maxSize: this.loggerOptions.fileMaxSize || '100m',
maxFiles: this.loggerOptions.fileMaxFiles || null,
});
Expand All @@ -102,8 +97,8 @@ export class MidwayBaseLogger extends EmptyLogger {
filename: this.loggerOptions.errorLogName,
datePattern: 'YYYY-MM-DD',
level: 'error',
createSymlink: true,
symlinkName: this.loggerOptions.disableErrorSymlink ? undefined: this.loggerOptions.errorLogName,
createSymlink: this.loggerOptions.disableErrorSymlink !== true,
symlinkName: this.loggerOptions.errorLogName,
maxSize: this.loggerOptions.errMaxSize || '100m',
maxFiles: this.loggerOptions.errMaxFiles || null,
});
Expand Down

0 comments on commit ee3589e

Please sign in to comment.