mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-10-26 05:50:01 +00:00
Silence the firehose of debug logging statements
This commit is contained in:
1 parent
b5241a0c30
commit
aea2067e1c
3 files changed
+12
-4
No files matched your search
@@ -8,6 +8,8 @@
|
||||
|
||||
#import "Logger.h"
|
||||
|
||||
static LogLevel LoggerLogLevel = LOG_I;
|
||||
|
||||
void LogTagv(LogLevel level, NSString* tag, NSString* fmt, va_list args);
|
||||
|
||||
void Log(LogLevel level, NSString* fmt, ...) {
|
||||
@@ -27,6 +29,10 @@ void LogTag(LogLevel level, NSString* tag, NSString* fmt, ...) {
|
||||
void LogTagv(LogLevel level, NSString* tag, NSString* fmt, va_list args) {
|
||||
NSString* levelPrefix = @"";
|
||||
|
||||
if (level < LoggerLogLevel) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch(level) {
|
||||
case LOG_D:
|
||||
levelPrefix = PRFX_DEBUG;
|
||||
@@ -41,6 +47,8 @@ void LogTagv(LogLevel level, NSString* tag, NSString* fmt, va_list args) {
|
||||
levelPrefix = PRFX_ERROR;
|
||||
break;
|
||||
default:
|
||||
levelPrefix = @"";
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
NSString* prefixedString;
|
||||
|
||||
Reference in new issue
Block a user