Skip to content

rista404/deno-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deno Debug Build Status

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's util.inspect so the output may not be the same.
  • We're using a custom format function ported from util. Might be cool to extract it when util is ported entirely.
  • We should cover more functionality with tests.

About

Debugging utility for deno. Ported from https://npmjs.com/debug

Topics

Resources

License

Stars

Watchers

Forks

Contributors