ls-deno/log.ts
2022-10-11 12:20:25 -05:00

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"],
},
},
});
}