Deno Debug
Debug utility for deno.
Usage
import debug from "https://deno.land/x/debuglog/debug.ts";
// create debugger
const service = debug("service");
const serviceName = "app";
// log
service("booting %s", serviceName);
Then run your app.
> DEBUG=* deno run --allow-env app.ts
Todo
- extending debuggers
- custom log functions
- custom formatters
-
log
override in all namespaces - inspect opts
- detecting color support
- non-tty env
- add
debug
to registry
Notes
- Currently debug assumes it is TTY and shows colors by default.
- Deno’s
inspect
differs from node’sutil.inspect
so the output may not be the same. - We’re using a custom
format
function ported fromutil
. Might be cool to extract it whenutil
is ported entirely. - We should cover more functionality with tests.