mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-17 22:23:52 +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) {
|
if (receivedResponse) {
|
||||||
Log(LOG_I, @"Received serverinfo response on try %d", i);
|
Log(LOG_D, @"Received serverinfo response on try %d", i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -128,14 +128,14 @@ int ArInit(int audioConfiguration, POPUS_MULTISTREAM_CONFIGURATION opusConfig, v
|
|||||||
|
|
||||||
status = AudioQueueNewOutput(&audioFormat, FillOutputBuffer, nil, nil, nil, 0, &audioQueue);
|
status = AudioQueueNewOutput(&audioFormat, FillOutputBuffer, nil, nil, nil, 0, &audioQueue);
|
||||||
if (status != noErr) {
|
if (status != noErr) {
|
||||||
NSLog(@"Error allocating output queue: %d\n", status);
|
Log(LOG_E, @"Error allocating output queue: %d\n", status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < AUDIO_QUEUE_BUFFERS; i++) {
|
for (int i = 0; i < AUDIO_QUEUE_BUFFERS; i++) {
|
||||||
status = AudioQueueAllocateBuffer(audioQueue, audioFormat.mBytesPerFrame * FRAME_SIZE, &audioBuffers[i]);
|
status = AudioQueueAllocateBuffer(audioQueue, audioFormat.mBytesPerFrame * FRAME_SIZE, &audioBuffers[i]);
|
||||||
if (status != noErr) {
|
if (status != noErr) {
|
||||||
NSLog(@"Error allocating output buffer: %d\n", status);
|
Log(LOG_E, @"Error allocating output buffer: %d\n", status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ int ArInit(int audioConfiguration, POPUS_MULTISTREAM_CONFIGURATION opusConfig, v
|
|||||||
|
|
||||||
status = AudioQueueStart(audioQueue, nil);
|
status = AudioQueueStart(audioQueue, nil);
|
||||||
if (status != noErr) {
|
if (status != noErr) {
|
||||||
NSLog(@"Error starting queue: %d\n", status);
|
Log(LOG_E, @"Error starting queue: %d\n", status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
#import "Logger.h"
|
#import "Logger.h"
|
||||||
|
|
||||||
|
static LogLevel LoggerLogLevel = LOG_I;
|
||||||
|
|
||||||
void LogTagv(LogLevel level, NSString* tag, NSString* fmt, va_list args);
|
void LogTagv(LogLevel level, NSString* tag, NSString* fmt, va_list args);
|
||||||
|
|
||||||
void Log(LogLevel level, NSString* fmt, ...) {
|
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) {
|
void LogTagv(LogLevel level, NSString* tag, NSString* fmt, va_list args) {
|
||||||
NSString* levelPrefix = @"";
|
NSString* levelPrefix = @"";
|
||||||
|
|
||||||
|
if (level < LoggerLogLevel) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch(level) {
|
switch(level) {
|
||||||
case LOG_D:
|
case LOG_D:
|
||||||
levelPrefix = PRFX_DEBUG;
|
levelPrefix = PRFX_DEBUG;
|
||||||
@@ -41,6 +47,8 @@ void LogTagv(LogLevel level, NSString* tag, NSString* fmt, va_list args) {
|
|||||||
levelPrefix = PRFX_ERROR;
|
levelPrefix = PRFX_ERROR;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
levelPrefix = @"";
|
||||||
|
assert(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
NSString* prefixedString;
|
NSString* prefixedString;
|
||||||
|
|||||||
Reference in New Issue
Block a user