Merge "Add LOG_SILENT LogPriority Again"
This commit is contained in:
@@ -14,11 +14,15 @@ namespace wvcdm {
|
||||
// Simple logging class. The implementation is platform dependent.
|
||||
|
||||
typedef enum {
|
||||
LOG_ERROR,
|
||||
LOG_WARN,
|
||||
LOG_INFO,
|
||||
LOG_DEBUG,
|
||||
LOG_VERBOSE
|
||||
// This log level should only be used for |g_cutoff|, in order to silence all
|
||||
// logging. It should never be passed to |Log()| as a log level.
|
||||
LOG_SILENT = -1,
|
||||
|
||||
LOG_ERROR = 0,
|
||||
LOG_WARN = 1,
|
||||
LOG_INFO = 2,
|
||||
LOG_DEBUG = 3,
|
||||
LOG_VERBOSE = 4,
|
||||
} LogPriority;
|
||||
|
||||
extern LogPriority g_cutoff;
|
||||
|
||||
@@ -61,6 +61,7 @@ void Log(const char* file, const char* function, int line, LogPriority level,
|
||||
android_LogPriority prio = ANDROID_LOG_VERBOSE;
|
||||
|
||||
switch(level) {
|
||||
case LOG_SILENT: return; // It is nonsensical to pass LOG_SILENT.
|
||||
case LOG_ERROR: prio = ANDROID_LOG_ERROR; break;
|
||||
case LOG_WARN: prio = ANDROID_LOG_WARN; break;
|
||||
case LOG_INFO: prio = ANDROID_LOG_INFO; break;
|
||||
|
||||
Reference in New Issue
Block a user