mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 11:42:13 +03:00
24 lines
552 B
TypeScript
24 lines
552 B
TypeScript
import * as log from "https://deno.land/std/log/mod.ts";
|
|
|
|
export async function myCLI(): Promise<void> {
|
|
await log.setup({
|
|
handlers: {
|
|
// file: new log.handlers.FileHandler("DEBUG", {
|
|
// filename: 'my.log'
|
|
// }),
|
|
console: new log.handlers.ConsoleHandler("INFO")
|
|
},
|
|
loggers: {
|
|
default: {
|
|
level: "DEBUG",
|
|
handlers: ["console", "file"]
|
|
}
|
|
}
|
|
});
|
|
|
|
log.info("Ok!");
|
|
}
|
|
|
|
if (import.meta.main) {
|
|
myCLI();
|
|
} |