summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2014-06-01 11:49:58 -0400
committerGravatar bunnei2014-06-01 11:49:58 -0400
commit00adbc7817194183dbea95ddfdb8678a5571c799 (patch)
tree40306165e2c7cddd978ecd0864d225c60f609270 /src
parentlog: updated GenericLog __attribute__ for newly added parameter (diff)
downloadyuzu-00adbc7817194183dbea95ddfdb8678a5571c799.tar.gz
yuzu-00adbc7817194183dbea95ddfdb8678a5571c799.tar.xz
yuzu-00adbc7817194183dbea95ddfdb8678a5571c799.zip
log: updated MAX_LOGLEVEL to use correct log level enum type
Diffstat (limited to 'src')
-rw-r--r--src/common/log.h6
-rw-r--r--src/common/log_manager.cpp2
-rw-r--r--src/common/log_manager.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/common/log.h b/src/common/log.h
index 3518d4e1d..a3c8bdde6 100644
--- a/src/common/log.h
+++ b/src/common/log.h
@@ -94,10 +94,10 @@ void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type, const char*file, int
94 ; 94 ;
95 95
96#if defined LOGGING || defined _DEBUG || defined DEBUGFAST 96#if defined LOGGING || defined _DEBUG || defined DEBUGFAST
97#define MAX_LOGLEVEL DEBUG_LEVEL 97#define MAX_LOGLEVEL LDEBUG
98#else 98#else
99#ifndef MAX_LOGLEVEL 99#ifndef MAX_LOGLEVEL
100#define MAX_LOGLEVEL WARNING_LEVEL 100#define MAX_LOGLEVEL LWARNING
101#endif // loglevel 101#endif // loglevel
102#endif // logging 102#endif // logging
103 103
@@ -109,7 +109,7 @@ void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type, const char*file, int
109 109
110// Let the compiler optimize this out 110// Let the compiler optimize this out
111#define GENERIC_LOG(t, v, ...) { \ 111#define GENERIC_LOG(t, v, ...) { \
112 if (v <= MAX_LOGLEVEL) \ 112 if (v <= LogTypes::MAX_LOGLEVEL) \
113 GenericLog(v, t, __FILE__, __LINE__, __func__, __VA_ARGS__); \ 113 GenericLog(v, t, __FILE__, __LINE__, __func__, __VA_ARGS__); \
114 } 114 }
115 115
diff --git a/src/common/log_manager.cpp b/src/common/log_manager.cpp
index d026fca56..b6caba3bf 100644
--- a/src/common/log_manager.cpp
+++ b/src/common/log_manager.cpp
@@ -149,7 +149,7 @@ LogContainer::LogContainer(const char* shortName, const char* fullName, bool ena
149{ 149{
150 strncpy(m_fullName, fullName, 128); 150 strncpy(m_fullName, fullName, 128);
151 strncpy(m_shortName, shortName, 32); 151 strncpy(m_shortName, shortName, 32);
152 m_level = (LogTypes::LOG_LEVELS)MAX_LOGLEVEL; 152 m_level = LogTypes::MAX_LOGLEVEL;
153} 153}
154 154
155// LogContainer 155// LogContainer
diff --git a/src/common/log_manager.h b/src/common/log_manager.h
index 3e238dfa7..6d3d7c7ff 100644
--- a/src/common/log_manager.h
+++ b/src/common/log_manager.h
@@ -97,7 +97,7 @@ private:
97 ~LogManager(); 97 ~LogManager();
98public: 98public:
99 99
100 static u32 GetMaxLevel() { return MAX_LOGLEVEL; } 100 static u32 GetMaxLevel() { return LogTypes::MAX_LOGLEVEL; }
101 101
102 void Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* file, int line, 102 void Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* file, int line,
103 const char* function, const char *fmt, va_list args); 103 const char* function, const char *fmt, va_list args);