Skip to content

Commit

Permalink
docs(aya-log): reword rustdocs a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrod committed Apr 25, 2024
1 parent 60abea5 commit 8830c0b
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions aya-log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,18 @@ impl EbpfLogger {
Ok(EbpfLogger {})
}

/// Attaches to an existing `aya-log-ebpf` log created by a running ebpf
/// program identified by `program_id`. The log records will be written
/// to the default logger. See [log::logger].
/// It can be used to review the log for a pinned program after the user
/// application exits.
/// 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].
pub fn init_from_id(program_id: u32) -> Result<EbpfLogger, Error> {
Self::init_from_id_with_logger(program_id, log::logger())
}

/// Attaches to an existing `aya-log-ebpf` log created by a running ebpf
/// program identified by `program_id`. The log records will be written
/// to the user provided logger.
/// It can be used to review the log for a pinned program after the user
/// application exits.
/// 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.
pub fn init_from_id_with_logger<T: Log + 'static>(
program_id: u32,
logger: T,
Expand Down

0 comments on commit 8830c0b

Please sign in to comment.