Merge pull request #10 from Syphurith/gl

Renamed Symbols for `gl` branch
This commit is contained in:
vlj 2015-05-22 18:25:17 +02:00
commit d5bdf78a29
3 changed files with 24 additions and 24 deletions

View File

@ -57,7 +57,7 @@ LogChannel::LogChannel() : LogChannel("unknown")
LogChannel::LogChannel(const std::string& name) : LogChannel::LogChannel(const std::string& name) :
name(name) name(name)
, mEnabled(true) , mEnabled(true)
, mLogLevel(Warning) , mLogLevel(LogSeverityWarning)
{} {}
void LogChannel::log(const LogMessage &msg) void LogChannel::log(const LogMessage &msg)
@ -186,16 +186,16 @@ void LogManager::log(LogMessage msg)
std::string prefix; std::string prefix;
switch (msg.mServerity) switch (msg.mServerity)
{ {
case Success: case LogSeveritySuccess:
prefix = "S "; prefix = "S ";
break; break;
case Notice: case LogSeverityNotice:
prefix = "! "; prefix = "! ";
break; break;
case Warning: case LogSeverityWarning:
prefix = "W "; prefix = "W ";
break; break;
case Error: case LogSeverityError:
prefix = "E "; prefix = "E ";
break; break;
} }
@ -265,12 +265,12 @@ void log_message(Log::LogType type, Log::LogSeverity sev, std::string text)
else else
{ {
rMessageBox(text, rMessageBox(text,
sev == Notice ? "Notice" : sev == LogSeverityNotice ? "Notice" :
sev == Warning ? "Warning" : sev == LogSeverityWarning ? "Warning" :
sev == Success ? "Success" : sev == LogSeveritySuccess ? "Success" :
sev == Error ? "Error" : "Unknown", sev == LogSeverityError ? "Error" : "Unknown",
sev == Notice ? rICON_INFORMATION : sev == LogSeverityNotice ? rICON_INFORMATION :
sev == Warning ? rICON_EXCLAMATION : sev == LogSeverityWarning ? rICON_EXCLAMATION :
sev == Error ? rICON_ERROR : rICON_INFORMATION); sev == LogSeverityError ? rICON_ERROR : rICON_INFORMATION);
} }
} }

View File

@ -5,10 +5,10 @@
//first parameter is of type Log::LogType and text is of type std::string //first parameter is of type Log::LogType and text is of type std::string
#define LOG_SUCCESS(logType, text, ...) log_message(logType, Log::Success, text, ##__VA_ARGS__) #define LOG_SUCCESS(logType, text, ...) log_message(logType, Log::LogSeveritySuccess, text, ##__VA_ARGS__)
#define LOG_NOTICE(logType, text, ...) log_message(logType, Log::Notice, text, ##__VA_ARGS__) #define LOG_NOTICE(logType, text, ...) log_message(logType, Log::LogSeverityNotice, text, ##__VA_ARGS__)
#define LOG_WARNING(logType, text, ...) log_message(logType, Log::Warning, text, ##__VA_ARGS__) #define LOG_WARNING(logType, text, ...) log_message(logType, Log::LogSeverityWarning, text, ##__VA_ARGS__)
#define LOG_ERROR(logType, text, ...) log_message(logType, Log::Error, text, ##__VA_ARGS__) #define LOG_ERROR(logType, text, ...) log_message(logType, Log::LogSeverityError, text, ##__VA_ARGS__)
namespace Log namespace Log
{ {
@ -50,10 +50,10 @@ namespace Log
enum LogSeverity : u32 enum LogSeverity : u32
{ {
Notice = 0, LogSeverityNotice = 0,
Warning, LogSeverityWarning,
Success, LogSeveritySuccess,
Error, LogSeverityError,
}; };
struct LogMessage struct LogMessage

View File

@ -76,16 +76,16 @@ struct wxWriter : Log::LogListener
{ {
switch (msg.mServerity) switch (msg.mServerity)
{ {
case Log::Notice: case Log::LogSeverityNotice:
llogcon->SetDefaultStyle(m_color_white); llogcon->SetDefaultStyle(m_color_white);
break; break;
case Log::Warning: case Log::LogSeverityWarning:
llogcon->SetDefaultStyle(m_color_yellow); llogcon->SetDefaultStyle(m_color_yellow);
break; break;
case Log::Error: case Log::LogSeverityError:
llogcon->SetDefaultStyle(m_color_red); llogcon->SetDefaultStyle(m_color_red);
break; break;
case Log::Success: case Log::LogSeveritySuccess:
llogcon->SetDefaultStyle(m_color_green); llogcon->SetDefaultStyle(m_color_green);
break; break;
default: default: