docs(aya-log): reword rustdocs a bit

pull/900/head
Alessandro Decina 9 months ago
parent 60abea54ce
commit 8830c0bc20

@ -119,20 +119,18 @@ impl EbpfLogger {
Ok(EbpfLogger {}) Ok(EbpfLogger {})
} }
/// Attaches to an existing `aya-log-ebpf` log created by a running ebpf /// Attaches to an existing `aya-log-ebpf` instance.
/// program identified by `program_id`. The log records will be written ///
/// to the default logger. See [log::logger]. /// Attaches to the logs produced by `program_id`. Can be used to read logs generated by a
/// It can be used to review the log for a pinned program after the user /// pinned program. The log records will be written to the default logger. See [log::logger].
/// application exits.
pub fn init_from_id(program_id: u32) -> Result<EbpfLogger, Error> { pub fn init_from_id(program_id: u32) -> Result<EbpfLogger, Error> {
Self::init_from_id_with_logger(program_id, log::logger()) Self::init_from_id_with_logger(program_id, log::logger())
} }
/// Attaches to an existing `aya-log-ebpf` log created by a running ebpf /// Attaches to an existing `aya-log-ebpf` instance and logs with the given logger.
/// program identified by `program_id`. The log records will be written ///
/// to the user provided logger. /// Attaches to the logs produced by `program_id`. Can be used to read logs generated by a
/// It can be used to review the log for a pinned program after the user /// pinned program. The log records will be written to the given logger.
/// application exits.
pub fn init_from_id_with_logger<T: Log + 'static>( pub fn init_from_id_with_logger<T: Log + 'static>(
program_id: u32, program_id: u32,
logger: T, logger: T,

Loading…
Cancel
Save