deno-tl-log
Time-Level-Log for Deno🦕
Usage
Examples
For Deno CLI
See example file or run it in your terminal.
deno run https://deno.land/x/tl_log/examples/console.ts
For Deno Deploy
See example file or run it in your terminal.
deno run --allow-env --allow-net https://deno.land/x/tl_log/examples/server.ts
You can also use deployctl.
deployctl run --libs="" https://deno.land/x/tl_log/examples/server.ts
Motivation
Deno already has some log modules, such as std/log.
But most of the modules has the feature to write file, this will causes errors on the Deno Deploy environments.
This module is built to not conflict with Deno Deploy API.
This module also respects the selected levels. If user call warn
, the built-in
method console.warn
is called.
Prior arts
- The log colors are inspired by std/log.
- The log level indicators are inspired by log_symbols.
- The datetime formats are powered by Ptera.