You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/aya-log-ebpf-macros
Michal Rostecki 90faac2a3a aya-log: Add `*max_level_*` filter features
Add the following features for configuring the maximum log level
available:

* `max_level_off`
* `max_level_error`
* `max_level_warn`
* `max_level_info`
* `max_level_debug`
* `max_level_trace`
* `release_max_level_off`
* `release_max_level_error`
* `release_max_level_warn`
* `release_max_level_info`
* `release_max_level_debug`
* `release_max_level_trace`

Log invocations at disabled level will be skipped, which is especially
beneficial for eBPF programs which are not going to send unneceessary
logs through perf buffers.

Features with `release_` prefix are used only in release builds.

Those features have to applied on the userspace and eBPF crate
separately. The correct thing to do is to set them on the same level. In
case when userspace has higher maximum log level, it's not going to
recieve the logs beyond the filter in eBPF crate. In the opposite
situation, when eBPF crate has higher maximum level, it's going to waste
cycles on sending logs through perf buffer, while they are not going to
be displayed in the userspace.

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
..
src aya-log: Add `*max_level_*` filter features 2 years ago
Cargo.toml aya-log: Add `*max_level_*` filter features 2 years ago