Skip to content

Commit

Permalink
Convert println to log
Browse files Browse the repository at this point in the history
  • Loading branch information
samvel1024 committed Jan 10, 2021
1 parent f686105 commit b347987
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Empty file removed src/example.rs
Empty file.
3 changes: 2 additions & 1 deletion src/kbct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use thiserror::Error;
use linked_hash_map::LinkedHashMap;
use std::ptr::hash;
use std::str::Utf8Error;
use log::{warn, error, info};

#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
struct KbctComplexConf {
Expand Down Expand Up @@ -272,7 +273,7 @@ impl Kbct {
}
(Clicked, Released) | (Pressed, Released) => {
if prev_state.is_none() {
println!("WARNING: key press was not recorded, skipping");
warn!("WARNING: key press was not recorded, skipping");
} else {
let prev_mapped_code = prev_state.unwrap().mapped_code;
let down_keys = self.mapped_to_source.get(&prev_mapped_code)
Expand Down
2 changes: 0 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,10 @@ impl DeviceManager {
}

fn is_captured_by_path(&self, device: &String) -> bool {
println!("{:?} {}", self.captured_kb_paths, device);
self.captured_kb_paths.contains(device)
}

fn mark_captured(&mut self, device: &String) {
println!("{:?}", self.captured_kb_paths);
self.captured_kb_paths.insert(device.clone());
}

Expand Down

0 comments on commit b347987

Please sign in to comment.