logging: Unified to remove random eprint calls

This commit is contained in:
Dorota Czaplejewicz
2020-01-17 12:25:39 +00:00
parent cc418c3609
commit c75e085dc8
10 changed files with 130 additions and 56 deletions

View File

@ -7,6 +7,7 @@ use std::io;
use std::string::FromUtf8Error;
use ::action::Action;
use ::logging;
use std::io::Write;
use std::iter::{ FromIterator, IntoIterator };
@ -110,7 +111,12 @@ pub fn generate_keymap(
for (name, state) in keystates.iter() {
if let Action::Submit { text: _, keys } = &state.action {
if let 0 = keys.len() { eprintln!("Key {} has no keysyms", name); };
if let 0 = keys.len() {
log_print!(
logging::Level::Warning,
"Key {} has no keysyms", name,
);
};
for (named_keysym, keycode) in keys.iter().zip(&state.keycodes) {
write!(
buf,