25 lines
493 B
TypeScript
25 lines
493 B
TypeScript
export * as log from "$std/log/mod.ts";
|
|
import * as log from "$std/log/mod.ts";
|
|
|
|
const levelColors = {};
|
|
|
|
export function setupLoggers() {
|
|
log.setup({
|
|
handlers: {
|
|
console: new log.handlers.ConsoleHandler("DEBUG", {
|
|
formatter: `{datetime} {levelName} {msg}`,
|
|
}),
|
|
},
|
|
loggers: {
|
|
default: {
|
|
level: "DEBUG",
|
|
handlers: ["console", "file"],
|
|
},
|
|
tasks: {
|
|
level: "ERROR",
|
|
handlers: ["console"],
|
|
},
|
|
},
|
|
});
|
|
}
|