Merge pull request #56 from vadorovsky/env_logger

Switch from simplelog to env_logger
pull/57/head
Dave Tucker 2 years ago committed by GitHub
commit 88243bad08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,11 +10,11 @@ aya-log = "0.1"
{{project-name}}-common = { path = "../{{project-name}}-common", features=["user"] }
anyhow = "1.0.42"
clap = { version = "3.1", features = ["derive"] }
env_logger = "0.9"
{%- if program_type == "uprobe" %}
libc = "0.2.102"
{%- endif %}
log = "0.4"
simplelog = "0.12"
tokio = { version = "1.18", features = ["macros", "rt", "rt-multi-thread", "net", "signal"] }
[[bin]]

@ -39,7 +39,6 @@ use aya::programs::SocketFilter;
use aya_log::BpfLogger;
use clap::Parser;
use log::info;
use simplelog::{ColorChoice, ConfigBuilder, LevelFilter, TermLogger, TerminalMode};
use tokio::signal;
#[derive(Debug, Parser)]
@ -60,15 +59,7 @@ struct Opt {
async fn main() -> Result<(), anyhow::Error> {
let opt = Opt::parse();
TermLogger::init(
LevelFilter::Debug,
ConfigBuilder::new()
.set_target_level(LevelFilter::Error)
.set_location_level(LevelFilter::Error)
.build(),
TerminalMode::Mixed,
ColorChoice::Auto,
)?;
env_logger::init();
// This will include your eBPF object file as raw bytes at compile-time and load it at
// runtime. This approach is recommended for most real-world use cases. If you would

Loading…
Cancel
Save