Remove problematic lib chalk
This commit is contained in:
+1
-3
@@ -1,5 +1,4 @@
|
||||
import {Level, type Options, type Writer} from './types'
|
||||
import {get_color} from './color'
|
||||
|
||||
export const writers = new Map<string, Writer>()
|
||||
export let options: Options = {
|
||||
@@ -52,7 +51,6 @@ function log(message: any[], level: Level, namespace: string): void {
|
||||
let lvl = get_string(level)
|
||||
if (!options.pad_level) lvl = lvl.trimEnd()
|
||||
|
||||
const head_color = head.replace('$level', get_color(level)(lvl))
|
||||
const head_bw = head.replace('$level', lvl)
|
||||
|
||||
for (const [name, writer] of writers.entries()) {
|
||||
@@ -61,7 +59,7 @@ function log(message: any[], level: Level, namespace: string): void {
|
||||
if (options.verbose) console.log(`Writer's level is lower, discard message for ${name}`)
|
||||
continue
|
||||
}
|
||||
writer.log(level, options?.with_color ? head_color : head_bw, ...message)
|
||||
writer.log(level, head_bw, ...message)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user