Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Dec 18, 2024
1 parent 869ba46 commit a668a83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/logger/src/transports/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ export class ConsoleTransport implements ITransport {
/**
* Ignore logs that match the rules.
*/
ignoreRule?: string[];
ignoreRule?: (string | RegExp)[];
}
) {
this._consoleWrite = createLogWriter({
storage: this._options?.storage,
});
this._ignoreRules = (this._options?.ignoreRule ?? []).map(
(rule) => new RegExp(rule)
this._ignoreRules = (this._options?.ignoreRule ?? []).map((rule) =>
rule instanceof RegExp ? rule : new RegExp(rule)
);
}

Expand Down

0 comments on commit a668a83

Please sign in to comment.