customlog: remove emojis

Emojis are useful at information compression. Here they just repeat the
same log level and reduce clarity.

Fixes #111
This commit is contained in:
zimbatm 2021-05-13 22:28:56 +02:00
parent 5ce49c01f6
commit 7fa467bb3a
No known key found for this signature in database
GPG Key ID: 71BAF6D40C1D63D7
2 changed files with 6 additions and 22 deletions

View File

@ -2,16 +2,8 @@
#![allow(missing_docs)]
use console::style;
use console::Emoji;
use log::{Level, Metadata, Record};
pub static FOLDER: Emoji = Emoji("\u{1f4c2}", "");
pub static WARN: Emoji = Emoji("\u{26a0}\u{fe0f}", ":-)");
pub static ERROR: Emoji = Emoji("\u{26d4}", "");
pub static INFO: Emoji = Emoji("\u{2139}\u{fe0f}", "");
pub static DEBUG: Emoji = Emoji("\u{1f41b}", "");
pub static TRACE: Emoji = Emoji("\u{1f50e}", "");
pub static CUSTOM_LOG: CustomLog = CustomLog {};
/// Synchronized log bar and status message printing.
@ -27,32 +19,27 @@ impl log::Log for CustomLog {
fn log(&self, record: &Record) {
match record.level() {
Level::Trace => eprintln!(
"{} {}: {}",
TRACE,
"{}: {}",
style("[DEBUG]").bold().dim(),
record.args()
),
Level::Debug => eprintln!(
"{} {}: {}",
DEBUG,
"{}: {}",
style("[DEBUG]").bold().dim(),
record.args()
),
Level::Info => eprintln!(
"{} {}: {}",
INFO,
"{}: {}",
style("[INFO]").bold().dim(),
record.args()
),
Level::Warn => eprintln!(
"{} {}: {}",
WARN,
"{}: {}",
style("[WARN]").bold().dim(),
record.args()
),
Level::Error => eprintln!(
"{} {}: {}",
ERROR,
"{}: {}",
style("[ERR]").bold().dim(),
record.args()
),

View File

@ -1,6 +1,5 @@
//! Keep track of evaluations
use crate::{
customlog,
formatter::{Formatter, FormatterName},
get_path_mtime, Mtime,
};
@ -87,9 +86,7 @@ impl CacheManifest {
let mut f = File::create(manifest_path)?;
f.write_all(
format!(
"# {} DO NOT HAND EDIT THIS FILE {}\n\n{}",
customlog::WARN,
customlog::WARN,
"# DO NOT HAND EDIT THIS FILE\n\n{}",
toml::to_string_pretty(&self)?
)
.as_bytes(),