Skip to content

Commit

Permalink
Reduce logging level for captive portal and DHCP server (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyGrondin authored Oct 6, 2024
1 parent 6b85743 commit 1ba77ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
9 changes: 1 addition & 8 deletions edge-captive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,13 @@ pub fn reply(
let question = question?;

if matches!(question.qtype(), Rtype::A) && matches!(question.qclass(), Class::IN) {
log::info!(
"Question {:?} is of type A, answering with IP {:?}, TTL {:?}",
question,
ip,
ttl
);

let record = Record::new(
question.qname(),
Class::IN,
Ttl::from_duration_lossy(ttl),
A::from_octets(ip[0], ip[1], ip[2], ip[3]),
);
debug!("Answering question {:?} with {:?}", question, record);
debug!("Answering {:?} with {:?}", question, record);
answerb.push(record)?;
} else {
debug!("Question {:?} is not of type A, not answering", question);
Expand Down
6 changes: 3 additions & 3 deletions edge-dhcp/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use core::fmt::Debug;

use embassy_time::{Duration, Instant};

use log::{info, warn};
use log::{debug, warn};

use super::*;

Expand Down Expand Up @@ -80,7 +80,7 @@ impl<'a> ServerOptions<'a> {
return None;
}

info!("Received {message_type} request: {request:?}");
debug!("Received {message_type} request: {request:?}");
match message_type {
MessageType::Discover => Some(Action::Discover(
request.options.requested_ip(),
Expand Down Expand Up @@ -154,7 +154,7 @@ impl<'a> ServerOptions<'a> {
),
);

info!("Sending {message_type} reply: {reply:?}");
debug!("Sending {message_type} reply: {reply:?}");

reply
}
Expand Down

0 comments on commit 1ba77ef

Please sign in to comment.