mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-03 06:26:09 +00:00
Silence the firehose of debug logging statements
This commit is contained in:
@@ -112,7 +112,7 @@ static const float POLL_RATE = 2.0f; // Poll every 2 seconds
|
||||
}
|
||||
|
||||
if (receivedResponse) {
|
||||
Log(LOG_I, @"Received serverinfo response on try %d", i);
|
||||
Log(LOG_D, @"Received serverinfo response on try %d", i);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -128,14 +128,14 @@ int ArInit(int audioConfiguration, POPUS_MULTISTREAM_CONFIGURATION opusConfig, v
|
||||
|
||||
status = AudioQueueNewOutput(&audioFormat, FillOutputBuffer, nil, nil, nil, 0, &audioQueue);
|
||||
if (status != noErr) {
|
||||
NSLog(@"Error allocating output queue: %d\n", status);
|
||||
Log(LOG_E, @"Error allocating output queue: %d\n", status);
|
||||
return status;
|
||||
}
|
||||
|
||||
for (int i = 0; i < AUDIO_QUEUE_BUFFERS; i++) {
|
||||
status = AudioQueueAllocateBuffer(audioQueue, audioFormat.mBytesPerFrame * FRAME_SIZE, &audioBuffers[i]);
|
||||
if (status != noErr) {
|
||||
NSLog(@"Error allocating output buffer: %d\n", status);
|
||||
Log(LOG_E, @"Error allocating output buffer: %d\n", status);
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ int ArInit(int audioConfiguration, POPUS_MULTISTREAM_CONFIGURATION opusConfig, v
|
||||
|
||||
status = AudioQueueStart(audioQueue, nil);
|
||||
if (status != noErr) {
|
||||
NSLog(@"Error starting queue: %d\n", status);
|
||||
Log(LOG_E, @"Error starting queue: %d\n", status);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
@@ -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