depot/patches/custom/deploy-rs/deploy-rs-no-emojis.patch
2022-01-14 22:49:37 +01:00

51 lines
1.3 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff --git a/src/lib.rs b/src/lib.rs
index b93b9ae..9081214 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -17,16 +17,6 @@ pub fn make_lock_path(temp_path: &str, closure: &str) -> String {
format!("{}/deploy-rs-canary-{}", temp_path, lock_hash)
}
-fn make_emoji(level: log::Level) -> &'static str {
- match level {
- log::Level::Error => "❌",
- log::Level::Warn => "⚠️",
- log::Level::Info => "",
- log::Level::Debug => "❓",
- log::Level::Trace => "🖊️",
- }
-}
-
pub fn logger_formatter_activate(
w: &mut dyn std::io::Write,
_now: &mut DeferredNow,
@@ -36,8 +26,7 @@ pub fn logger_formatter_activate(
write!(
w,
- "⭐ {} [activate] [{}] {}",
- make_emoji(level),
+ "[activate] [{}] {}",
style(level, level.to_string()),
record.args()
)
@@ -52,8 +41,7 @@ pub fn logger_formatter_wait(
write!(
w,
- "👀 {} [wait] [{}] {}",
- make_emoji(level),
+ "[wait] [{}] {}",
style(level, level.to_string()),
record.args()
)
@@ -68,8 +56,7 @@ pub fn logger_formatter_deploy(
write!(
w,
- "🚀 {} [deploy] [{}] {}",
- make_emoji(level),
+ "[deploy] [{}] {}",
style(level, level.to_string()),
record.args()
)