From a6025255f56a941c2614d8bbf395e07b47588b75 Mon Sep 17 00:00:00 2001 From: conectado Date: Mon, 29 Aug 2022 13:45:08 -0300 Subject: [PATCH] aya: update `VerifierLogLevel` level variants --- aya/src/bpf.rs | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs index 284d7830..98ebd2a2 100644 --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -205,20 +205,14 @@ pub enum VerifierLogLevel { /// Disable all logging. Disable = 0, - /// Sets logging to level 1. - Level1 = 1, + /// Default level of logging, shows verifier stats. + Default = 4, - /// Sets logging to level 2. - Level2 = 3, + /// Prints verbose logs showing tracing. + Verbose = 1, - /// Only show verifier stats without any tracing. - Stats = 4, - - /// Show stats along with traces corresponding to level 1. - StatsLevel1 = 5, - - /// Show stats along with traces corresponding to level 2. - StatsLevel2 = 7, + /// Prints full debug details. + Debug = 7, } impl<'a> BpfLoader<'a> { @@ -232,7 +226,7 @@ impl<'a> BpfLoader<'a> { globals: HashMap::new(), features, extensions: HashSet::new(), - verifier_log_level: VerifierLogLevel::Stats, + verifier_log_level: VerifierLogLevel::Default, } } @@ -348,7 +342,7 @@ impl<'a> BpfLoader<'a> { /// use aya::{BpfLoader, VerifierLogLevel}; /// /// let bpf = BpfLoader::new() - /// .verifier_log_level(VerifierLogLevel::Level1) + /// .verifier_log_level(VerifierLogLevel::Verbose) /// .load_file("file.o")?; /// # Ok::<(), aya::BpfError>(()) /// ```