Some small fixes

This commit is contained in:
Dennis Schwerdel 2020-11-07 12:04:25 +01:00
parent 150f219e04
commit c31de207c7
4 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ import atexit, argparse, os
REGION = "eu-central-1" REGION = "eu-central-1"
VERSION = "1.4.0" VERSION = "2.0.0"
parser = argparse.ArgumentParser(description='Create a test setup') parser = argparse.ArgumentParser(description='Create a test setup')

View File

@ -828,7 +828,7 @@ impl<D: Device, P: Protocol, S: Socket, TS: TimeSource> GenericCloud<D, P, S, TS
if poll_error { if poll_error {
fail!("Poll wait failed again: {}", err); fail!("Poll wait failed again: {}", err);
} }
error!("Poll wait failed: {}, retrying...", err); debug!("Poll wait failed: {}, retrying...", err);
poll_error = true; poll_error = true;
} }
WaitResult::Timeout => {} WaitResult::Timeout => {}

View File

@ -26,13 +26,13 @@ pub enum Error {
#[error("Socker error: {0}")] #[error("Socker error: {0}")]
Socket(&'static str), Socket(&'static str),
#[error("Socker error: {0}")] #[error("Socker error: {0} ({1})")]
SocketIo(&'static str, #[source] io::Error), SocketIo(&'static str, #[source] io::Error),
#[error("Device error: {0}")] #[error("Device error: {0}")]
Device(&'static str), Device(&'static str),
#[error("Device error: {0}")] #[error("Device error: {0} ({1})")]
DeviceIo(&'static str, #[source] io::Error), DeviceIo(&'static str, #[source] io::Error),
#[error("File error: {0}")] #[error("File error: {0}")]
@ -41,7 +41,7 @@ pub enum Error {
#[error("Message error: {0}")] #[error("Message error: {0}")]
Message(&'static str), Message(&'static str),
#[error("Beacon error: {0}")] #[error("Beacon error: {0} ({1})")]
BeaconIo(&'static str, #[source] io::Error), BeaconIo(&'static str, #[source] io::Error),
#[error("Parse error: {0}")] #[error("Parse error: {0}")]

View File

@ -88,7 +88,7 @@ impl log::Log for DualLogger {
println!("{} - {}", record.level(), record.args()); println!("{} - {}", record.level(), record.args());
if let Some(ref file) = self.file { if let Some(ref file) = self.file {
let mut file = file.lock().expect("Lock poisoned"); let mut file = file.lock().expect("Lock poisoned");
let time = time::OffsetDateTime::now_local().format("%F %T"); let time = time::OffsetDateTime::now_local().format("%F %H:%M:%S");
writeln!(file, "{} - {} - {}", time, record.level(), record.args()) writeln!(file, "{} - {} - {}", time, record.level(), record.args())
.expect("Failed to write to logfile"); .expect("Failed to write to logfile");
} }