fix: use CSS color instead
This commit is contained in:
+12
-5
@@ -1,3 +1,4 @@
|
||||
import { feature } from "bun:bundle";
|
||||
import { color, inspect } from "bun";
|
||||
|
||||
const colors = [
|
||||
@@ -7,17 +8,23 @@ const colors = [
|
||||
"blue",
|
||||
"magenta",
|
||||
"cyan",
|
||||
"brightRed",
|
||||
"brightGreen",
|
||||
"brightBlue",
|
||||
"brightMagenta",
|
||||
"lime",
|
||||
"orange",
|
||||
"violet",
|
||||
"skyblue",
|
||||
"pink",
|
||||
"turquoise",
|
||||
"gold",
|
||||
"deepskyblue",
|
||||
"springgreen",
|
||||
];
|
||||
var i = 0;
|
||||
|
||||
if (!feature("API"))
|
||||
console.log(
|
||||
colors.map((c) => `${color(c, "ansi")}${c.slice(0, 1)}`).join("") +
|
||||
color("lightgray", "ansi"),
|
||||
);
|
||||
|
||||
export function createLogger() {
|
||||
const start = Date.now();
|
||||
const col = color(colors[i], "ansi");
|
||||
|
||||
Reference in New Issue
Block a user