Last active
February 9, 2024 22:39
-
-
Save imroca/e8f94470676ac093f44e77b8cbdc8e1f to your computer and use it in GitHub Desktop.
Small logging utilities setup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pc from "picocolors"; | |
// Assign colors. | |
export const success = pc.green; | |
export const ok = pc.green; | |
export const info = pc.cyan; | |
export const msg = pc.blue; | |
export const message = pc.blue; | |
export const notice = pc.magenta; | |
export const spam = pc.gray; | |
export const whisper = (msg) => pc.gray(pc.dim(msg)); | |
export const debug = pc.white; | |
export const warning = pc.yellow; | |
export const warn = pc.yellow; | |
export const error = pc.red; | |
export const critical = (msg) => pc.red(pc.bold(msg)); | |
export const crit = critical; | |
export const bold = pc.bold; | |
export const dim = pc.dim; | |
export const log = console.log; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment