Function libbpf_rs::get_print

source ·
pub fn get_print() -> Option<(PrintLevel, PrintCallback)>
Expand description

Return the current print callback and level.

§Examples

To temporarily suppress output:

use libbpf_rs::{get_print, set_print};

let prev = get_print();
set_print(None);
// do things quietly
set_print(prev);