Skip to content

Commit

Permalink
Merge pull request #272 from AliMD/bugfix/logger
Browse files Browse the repository at this point in the history
`accident` must inherit from `console.warn` not `console.error`
  • Loading branch information
alimd authored Sep 18, 2022
2 parents 259daa0 + fd80967 commit f3829e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/logger/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export const createLogger = (
scope,

accident: isBrowser ?
console.error.bind(console, '%c%s%c.%s "%s" => Accident: "%s" (%s)!', styleScope, scope, style.reset) :
console.error.bind(console, `${styleScope}⚠️ %s\x1b[33m.%s "%s" =>${style.reset}`, scope),
console.warn.bind(console, '%c%s%c.%s "%s" => Accident: "%s" (%s)!', styleScope, scope, style.reset) :
console.warn.bind(console, `${styleScope}⚠️ %s\x1b[33m.%s "%s" =>${style.reset}`, scope),

error: isBrowser ?
console.error.bind(console, '%c%s%c.%s "%s" =>', styleScope, scope, style.reset) :
Expand Down

0 comments on commit f3829e3

Please sign in to comment.