aya: update `VerifierLogLevel` level variants

pull/371/head
conectado 2 years ago
parent edd80397dc
commit a6025255f5
No known key found for this signature in database
GPG Key ID: 338C2256E2EB62D4

@ -205,20 +205,14 @@ pub enum VerifierLogLevel {
/// Disable all logging. /// Disable all logging.
Disable = 0, Disable = 0,
/// Sets logging to level 1. /// Default level of logging, shows verifier stats.
Level1 = 1, Default = 4,
/// Sets logging to level 2. /// Prints verbose logs showing tracing.
Level2 = 3, Verbose = 1,
/// Only show verifier stats without any tracing. /// Prints full debug details.
Stats = 4, Debug = 7,
/// Show stats along with traces corresponding to level 1.
StatsLevel1 = 5,
/// Show stats along with traces corresponding to level 2.
StatsLevel2 = 7,
} }
impl<'a> BpfLoader<'a> { impl<'a> BpfLoader<'a> {
@ -232,7 +226,7 @@ impl<'a> BpfLoader<'a> {
globals: HashMap::new(), globals: HashMap::new(),
features, features,
extensions: HashSet::new(), 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}; /// use aya::{BpfLoader, VerifierLogLevel};
/// ///
/// let bpf = BpfLoader::new() /// let bpf = BpfLoader::new()
/// .verifier_log_level(VerifierLogLevel::Level1) /// .verifier_log_level(VerifierLogLevel::Verbose)
/// .load_file("file.o")?; /// .load_file("file.o")?;
/// # Ok::<(), aya::BpfError>(()) /// # Ok::<(), aya::BpfError>(())
/// ``` /// ```

Loading…
Cancel
Save