Log Verbosity

Log verbosity can be changed using the environment variable LOG_VERBOSITY.

Levels

  1. Error
  2. Warning
  3. Info
  4. Debug
  5. Trace
  6. In/Out
  7. In/Out (bin)

Examples

The following examples are valid in Unix shells.

$ LOG_VERBOSITY=4 deno run main.ts
$ LOG_VERBOSITY=4 npm start

In browsers, the global variable MTKRUTO__LOG_VERBOSITY can be used.

<!-- at the very top of the document -->
<script>globalThis.MTKRUTO__LOG_VERBOSITY = 4;</script>

Filtering Logs

Logs can be filtered by their scopes using the LOG_FILTER environment variable which expects vaild regular expression.

$ LOG_VERBOSITY=4 LOG_FILTER=receiveLoop deno run main.ts
$ LOG_VERBOSITY=4 LOG_VERBOSITY=receiveLoop npm start
<!-- at the very top of the document -->
<script>globalThis.MTKRUTO__LOG_FILTER = "receiveLoop";</script>