Skip to content

Commit

Permalink
cleanup features
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankurte committed Feb 14, 2022
1 parent e3e2350 commit f3a560a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ all-features = true
std = [ ]
nonblocking = [ ]
mock = [ "embedded-hal-mock" ]
helpers = [ "structopt", "humantime", "std", "pcap-file", "libc", "byteorder", "rolling-stats" ]
helpers = [ "structopt", "humantime", "std", "pcap-file", "libc", "byteorder", "rolling-stats", "log" ]
default = []

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use core::time::Duration;

use embedded_hal::delay::blocking::DelayUs;

#[cfg(not(feature = "defmt"))]
#[cfg(feature = "log")]
use log::debug;

#[cfg(feature = "defmt")]
Expand Down
6 changes: 6 additions & 0 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ use std::time::SystemTime;

use libc::{self};

#[cfg(feature = "log")]
use log::{debug, info};

#[cfg(feature = "defmt")]
use defmt::{debug, info};


use embedded_hal::delay::blocking::DelayUs;
use humantime::Duration as HumanDuration;
use structopt::StructOpt;
Expand Down Expand Up @@ -182,6 +187,7 @@ impl PcapOptions {
_ => unimplemented!(),
};

#[cfg(any(feature = "log", feature = "defmt"))]
info!("pcap pipe open, awaiting connection");

// Setup pcap writer and write header
Expand Down

0 comments on commit f3a560a

Please sign in to comment.