pub struct EbpfLogger;
Expand description
Log messages generated by aya_log_ebpf
using the log crate.
For more details see the module level documentation.
Implementations§
source§impl EbpfLogger
impl EbpfLogger
sourcepub fn init(bpf: &mut Ebpf) -> Result<EbpfLogger, Error>
pub fn init(bpf: &mut Ebpf) -> Result<EbpfLogger, Error>
Starts reading log records created with aya-log-ebpf
and logs them
with the default logger. See log::logger.
sourcepub fn init_with_logger<T: Log + 'static>(
bpf: &mut Ebpf,
logger: T,
) -> Result<EbpfLogger, Error>
pub fn init_with_logger<T: Log + 'static>( bpf: &mut Ebpf, logger: T, ) -> Result<EbpfLogger, Error>
Starts reading log records created with aya-log-ebpf
and logs them
with the given logger.
sourcepub fn init_from_id(program_id: u32) -> Result<EbpfLogger, Error>
pub fn init_from_id(program_id: u32) -> Result<EbpfLogger, Error>
Attaches to an existing aya-log-ebpf
instance.
Attaches to the logs produced by program_id
. Can be used to read logs generated by a
pinned program. The log records will be written to the default logger. See log::logger.
sourcepub fn init_from_id_with_logger<T: Log + 'static>(
program_id: u32,
logger: T,
) -> Result<EbpfLogger, Error>
pub fn init_from_id_with_logger<T: Log + 'static>( program_id: u32, logger: T, ) -> Result<EbpfLogger, Error>
Attaches to an existing aya-log-ebpf
instance and logs with the given logger.
Attaches to the logs produced by program_id
. Can be used to read logs generated by a
pinned program. The log records will be written to the given logger.