Log Verbosity
Log verbosity can be changed using the environment variable LOG_VERBOSITY
.
Levels
- Error
- Warning
- Info
- Debug
- Trace
- In/Out
- 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>