Skip to content

Commit

Permalink
Handle more log types (ie notice)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshamb committed Mar 6, 2024
1 parent e23ad33 commit ea1628d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions priv/static/phoenix_live_reload.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ class LiveReloader {
}

log(level, str){
let levelColor = {debug: "cyan", info: "inherit", error: "inherit"}[level]
let consoleFunc = level === "debug" ? "info" : level
let levelColor = level === "debug" ? "cyan" : "inherit"
let consoleFunc = level === "error" ? level : "info"
console[consoleFunc](`%c📡 [${level}] ${str}`, `color: ${levelColor};`)
}

Expand Down

0 comments on commit ea1628d

Please sign in to comment.