From 30658afd3e19ddf6fe11a294a6b044fc21b1ca34 Mon Sep 17 00:00:00 2001 From: king6cong Date: Fri, 21 Apr 2017 17:57:37 +0800 Subject: [PATCH] add emoji to log level name for iOS because we can't tweak Xcode 8 to use color in console https://github.com/robbiehanson/XcodeColors/issues/88 --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 6c222baef..37c7fa49f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -241,8 +241,12 @@ const INITIALIZED: usize = 2; static MAX_LOG_LEVEL_FILTER: AtomicUsize = ATOMIC_USIZE_INIT; +#[cfg(target_os = "ios")] static LOG_LEVEL_NAMES: [&'static str; 6] = ["OFF", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"]; +#[cfg(not(target_os = "ios"))] +static LOG_LEVEL_NAMES: [&'static str; 6] = ["OFF", "❤️ ERROR", "💛 WARN", "💙 INFO", + "💚 DEBUG", "💜 TRACE"]; /// An enum representing the available verbosity levels of the logging framework ///