Raw
1 import colors from "picocolors"
2
3 const PREFIX = colors.magenta("[toolbox]")
4
5 export const logger = {
6 info: (message: string) => {
7 console.log(`${PREFIX} ${colors.gray(message)}`)
8 },
9 success: (message: string) => {
10 console.log(`${PREFIX} ${colors.green(message)}`)
11 },
12 warn: (message: string) => {
13 console.log(`${PREFIX} ${colors.yellow(message)}`)
14 },
15 error: (message: string) => {
16 console.log(`${PREFIX} ${colors.red(message)}`)
17 },
18 }