import { __toESM } from "../../../../../_virtual/rolldown_runtime.js";
import { require_dayjs_min } from "../../../../dayjs/dayjs.min.js";
var import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1), __defProp = Object.defineProperty, __name = (e, c) => __defProp(e, "name", {
	value: c,
	configurable: !0
}), __export = (e, c) => {
	for (var l in c) __defProp(e, l, {
		get: c[l],
		enumerable: !0
	});
}, LEVELS = {
	trace: 0,
	debug: 1,
	info: 2,
	warn: 3,
	error: 4,
	fatal: 5
}, log = {
	trace: /* @__PURE__ */ __name((...e) => {}, "trace"),
	debug: /* @__PURE__ */ __name((...e) => {}, "debug"),
	info: /* @__PURE__ */ __name((...e) => {}, "info"),
	warn: /* @__PURE__ */ __name((...e) => {}, "warn"),
	error: /* @__PURE__ */ __name((...e) => {}, "error"),
	fatal: /* @__PURE__ */ __name((...e) => {}, "fatal")
}, setLogLevel = /* @__PURE__ */ __name(function(e = "fatal") {
	let c = LEVELS.fatal;
	typeof e == "string" ? e.toLowerCase() in LEVELS && (c = LEVELS[e]) : typeof e == "number" && (c = e), log.trace = () => {}, log.debug = () => {}, log.info = () => {}, log.warn = () => {}, log.error = () => {}, log.fatal = () => {}, c <= LEVELS.fatal && (log.fatal = console.error ? console.error.bind(console, format("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", format("FATAL"))), c <= LEVELS.error && (log.error = console.error ? console.error.bind(console, format("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", format("ERROR"))), c <= LEVELS.warn && (log.warn = console.warn ? console.warn.bind(console, format("WARN"), "color: orange") : console.log.bind(console, "\x1B[33m", format("WARN"))), c <= LEVELS.info && (log.info = console.info ? console.info.bind(console, format("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", format("INFO"))), c <= LEVELS.debug && (log.debug = console.debug ? console.debug.bind(console, format("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format("DEBUG"))), c <= LEVELS.trace && (log.trace = console.debug ? console.debug.bind(console, format("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format("TRACE")));
}, "setLogLevel"), format = /* @__PURE__ */ __name((e) => `%c${(0, import_dayjs_min.default)().format("ss.SSS")} : ${e} : `, "format");
export { __export, __name, log, setLogLevel };
