Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #57 from redcanaryco/more-info-to-debug-logging
Browse files Browse the repository at this point in the history
set bpf/syscall logging to debug
  • Loading branch information
rc-vbundage authored Sep 9, 2022
2 parents 7763ce7 + 79460c8 commit 4f2ae2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "A pure-Rust library for managing eBPF programs."
homepage = "https://github.com/redcanaryco/oxidebpf"
repository = "https://github.com/redcanaryco/oxidebpf"
readme = "README.md"
version = "0.2.6"
version = "0.2.7"
license = "BSD-3-Clause"
keywords = ["eBPF", "BPF", "linux"]
categories = ["config", "data-structures", "os::linux-apis", "parsing"]
Expand Down
8 changes: 4 additions & 4 deletions src/bpf/syscall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use lazy_static::lazy_static;
use retry::delay::NoDelay;
use retry::{retry_with_index, OperationResult};
use slog::info;
use slog::debug;
use std::ffi::CString;
use std::mem::MaybeUninit;
use std::os::unix::io::RawFd;
Expand Down Expand Up @@ -57,7 +57,7 @@ unsafe fn sys_bpf(cmd: u32, arg_bpf_attr: SizedBpfAttr) -> Result<usize, Oxidebp

if ret < 0 {
e = errno();
info!(
debug!(
LOGGER.0,
"sys_bpf(); cmd: {}; errno: {}; arg_bpf_attr: {:?}", cmd, e, arg_bpf_attr
);
Expand Down Expand Up @@ -124,7 +124,7 @@ pub(crate) fn bpf_prog_load(
match sys_bpf(BPF_PROG_LOAD, bpf_attr) {
Ok(fd) => Ok(fd as RawFd),
Err(e) => {
info!(
debug!(
LOGGER.0,
"bpf_prog_load(); error with sys_bpf; bpf_attr: {:?}", bpf_attr
);
Expand All @@ -142,7 +142,7 @@ pub(crate) fn bpf_prog_load(
.chars()
.rev()
.collect();
info!(LOGGER.0, "bpf_prog_load(); log_buf: {}", last_chars);
debug!(LOGGER.0, "bpf_prog_load(); log_buf: {}", last_chars);
Err(OxidebpfError::BpfProgLoadError((Box::new(e), log_string)))
}
#[cfg(not(feature = "log_buf"))]
Expand Down

0 comments on commit 4f2ae2d

Please sign in to comment.