From 6f1bfcb23230bd2e340d407260f3b83f216c6bc9 Mon Sep 17 00:00:00 2001 From: Jan Willem Penterman Date: Tue, 21 Apr 2015 10:34:07 +0200 Subject: [PATCH] added some missing "color" definitions and uisng basic charset for logger "icons" --- libdevcore/Log.cpp | 9 +++ libdevcore/Terminal.h | 131 ++++++++++++++++++++---------------------- 2 files changed, 72 insertions(+), 68 deletions(-) diff --git a/libdevcore/Log.cpp b/libdevcore/Log.cpp index c4cacad26..5515fd8da 100644 --- a/libdevcore/Log.cpp +++ b/libdevcore/Log.cpp @@ -34,12 +34,21 @@ using namespace dev; int dev::g_logVerbosity = 5; map dev::g_logOverride; +#ifdef _WIN32 +const char* LogChannel::name() { return EthGray "..."; } +const char* LeftChannel::name() { return EthNavy "<--"; } +const char* RightChannel::name() { return EthGreen "-->"; } +const char* WarnChannel::name() { return EthOnRed EthBlackBold " X"; } +const char* NoteChannel::name() { return EthBlue " i"; } +const char* DebugChannel::name() { return EthWhite " D"; } +#else const char* LogChannel::name() { return EthGray "···"; } const char* LeftChannel::name() { return EthNavy "◀▬▬"; } const char* RightChannel::name() { return EthGreen "▬▬▶"; } const char* WarnChannel::name() { return EthOnRed EthBlackBold " ✘"; } const char* NoteChannel::name() { return EthBlue " ℹ"; } const char* DebugChannel::name() { return EthWhite " ◇"; } +#endif LogOutputStreamBase::LogOutputStreamBase(char const* _id, std::type_info const* _info, unsigned _v) { diff --git a/libdevcore/Terminal.h b/libdevcore/Terminal.h index f4e31e7e4..a30a527f2 100644 --- a/libdevcore/Terminal.h +++ b/libdevcore/Terminal.h @@ -9,75 +9,70 @@ namespace con #define EthReset "" // Text Reset -// Regular Colors -#define EthBlack "" // Black -#define EthRed "" // Red -#define EthGreen "" // Green -#define EthYellow "" // Yellow -#define EthBlue "" // Blue -#define EthPurple "" // Purple -#define EthCyan "" // Cyan -#define EthWhite "" // White - -// Bold -#define EthBlackB "" // Black -#define EthRedB "" // Red -#define EthGreenB "" // Green -#define EthYellowB "" // Yellow -#define EthBlueB "" // Blue -#define EthPurpleB "" // Purple -#define EthCyanB "" // Cyan -#define EthWhiteB "" // White - -// Underline -#define EthBlackU "" // Black -#define EthRedU "" // Red -#define EthGreenU "" // Green -#define EthYellowU "" // Yellow -#define EthBlueU "" // Blue -#define EthPurpleU "" // Purple -#define EthCyanU "" // Cyan -#define EthWhiteU "" // White +#define EthReset "" // Text Reset -// Background -#define EthBlackOn "" // Black -#define EthRedOn "" // Red -#define EthGreenOn "" // Green -#define EthYellowOn "" // Yellow -#define EthBlueOn "" // Blue -#define EthPurpleOn "" // Purple -#define EthCyanOn "" // Cyan -#define EthWhiteOn "" // White - -// High Intensity -#define EthCoal "" // Black -#define EthRedI "" // Red -#define EthLime "" // Green -#define EthYellowI "" // Yellow -#define EthBlueI "" // Blue -#define EthPurpleI "" // Purple -#define EthCyanI "" // Cyan -#define EthWhiteI "" // White - -// Bold High Intensity -#define EthBlackBI "" // Black -#define EthRedBI "" // Red -#define EthGreenBI "" // Green -#define EthYellowBI "" // Yellow -#define EthBlueBI "" // Blue -#define EthPurpleBI "" // Purple -#define EthCyanBI "" // Cyan -#define EthWhiteBI "" // White - -// High Intensity backgrounds -#define EthBlackOnI "" // Black -#define EthRedOnI "" // Red -#define EthGreenOnI "" // Green -#define EthYellowOnI "" // Yellow -#define EthBlueOnI "" // Blue -#define EthPurpleOnI "" // Purple -#define EthCyanOnI "" // Cyan -#define EthWhiteOnI "" // White + // Regular Colors +#define EthBlack "" // Black +#define EthCoal "" // Black +#define EthGray "" // White +#define EthWhite "" // White +#define EthMaroon "" // Red +#define EthRed "" // Red +#define EthGreen "" // Green +#define EthLime "" // Green +#define EthOrange "" // Yellow +#define EthYellow "" // Yellow +#define EthNavy "" // Blue +#define EthBlue "" // Blue +#define EthViolet "" // Purple +#define EthPurple "" // Purple +#define EthTeal "" // Cyan +#define EthCyan "" // Cyan + +#define EthBlackBold "" // Black +#define EthCoalBold "" // Black +#define EthGrayBold "" // White +#define EthWhiteBold "" // White +#define EthMaroonBold "" // Red +#define EthRedBold "" // Red +#define EthGreenBold "" // Green +#define EthLimeBold "" // Green +#define EthOrangeBold "" // Yellow +#define EthYellowBold "" // Yellow +#define EthNavyBold "" // Blue +#define EthBlueBold "" // Blue +#define EthVioletBold "" // Purple +#define EthPurpleBold "" // Purple +#define EthTealBold "" // Cyan +#define EthCyanBold "" // Cyan + + // Background +#define EthOnBlack "" // Black +#define EthOnCoal "" // Black +#define EthOnGray "" // White +#define EthOnWhite "" // White +#define EthOnMaroon "" // Red +#define EthOnRed "" // Red +#define EthOnGreen "" // Green +#define EthOnLime "" // Green +#define EthOnOrange "" // Yellow +#define EthOnYellow "" // Yellow +#define EthOnNavy "" // Blue +#define EthOnBlue "" // Blue +#define EthOnViolet "" // Purple +#define EthOnPurple "" // Purple +#define EthOnTeal "" // Cyan +#define EthOnCyan "" // Cyan + + // Underline +#define EthBlackUnder "" // Black +#define EthGrayUnder "" // White +#define EthMaroonUnder "" // Red +#define EthGreenUnder "" // Green +#define EthOrangeUnder "" // Yellow +#define EthNavyUnder "" // Blue +#define EthVioletUnder "" // Purple +#define EthTealUnder "" // Cyan #else