Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aya-log: Add *max_level_* filter features #399

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 30, 2022

  1. 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>
    vadorovsky committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    90faac2 View commit details
    Browse the repository at this point in the history