https://github.com/rista404/deno-debug
Debugging utility for deno. Ported from https://npmjs.com/debug
https://github.com/rista404/deno-debug
debug debugging deno logging utility
Last synced: 4 months ago
JSON representation
Debugging utility for deno. Ported from https://npmjs.com/debug
- Host: GitHub
- URL: https://github.com/rista404/deno-debug
- Owner: rista404
- License: mit
- Created: 2019-01-20T03:54:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-10T12:00:11.000Z (almost 5 years ago)
- Last Synced: 2025-10-31T04:00:03.407Z (8 months ago)
- Topics: debug, debugging, deno, logging, utility
- Language: TypeScript
- Homepage:
- Size: 468 KB
- Stars: 14
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno Debug [](https://travis-ci.org/rista404/deno-debug)

Debug utility for deno.
## Usage
```javascript
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.
```sh
> DEBUG=* deno run --allow-env app.ts
```
## Todo
- [x] extending debuggers
- [x] custom log functions
- [x] custom formatters
- [x] `log` override in all namespaces
- [x] inspect opts
- [x] detecting color support
- [ ] non-tty env
- [x] 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.