Skip to content

Commit

Permalink
Merge pull request #150 from joshamb/main
Browse files Browse the repository at this point in the history
Handle more log types (ie notice)
  • Loading branch information
chrismccord committed Mar 11, 2024
2 parents 815aab6 + ea1628d commit e7805fa
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 e7805fa

Please sign in to comment.