Expand description
§Fine-grain log filtering
A large application may designed with multiple layers. Sometimes you have many files and modules, and you want more fine-grain controlling for the log, turn on / off by functionality.
In order not limit by the number of log level, you can separate LogFilter into
category, and place LogFilter in Arc and share among threads and coroutines.
It will become more flexible with the number of LogFilter X log_level.
When you want to debug the behavior on-the-flay,
you can just change log level of a certain LogFilter with API.
See the doc of LogFilter for details.
In order For API level tracking, we provide KeyFilter, which inherits from LogFilter,
a custom key can be placed in it. It’s like human readable log with structure message.
So that you can grep the log with specified request.
See the doc of KeyFilter for details.
Structs§
- Dummy
Filter - A Filter that enables all log levels
- KeyFilter
KeyFilteris wrapper from Filter, with one additional key into log format.- LogFilter
LogFiltersupports concurrent control the log level filter with atomic.
Traits§
Type Aliases§
- KeyLogger
- Apply the keyed log format without a wrapper