mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-01 00:35:33 +00:00
no message
This commit is contained in:
@@ -18,6 +18,7 @@ extern "C" {
|
||||
bool MTLogEnabled();
|
||||
void MTLog(NSString *format, ...);
|
||||
void MTLogSetLoggingFunction(void (*function)(NSString *, va_list args));
|
||||
void MTLogSetEnabled(bool);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
#import "MTLogging.h"
|
||||
|
||||
static void (*loggingFunction)(NSString *, va_list args) = NULL;
|
||||
static bool MTLogEnabledValue = true;
|
||||
|
||||
bool MTLogEnabled() {
|
||||
return loggingFunction != NULL;
|
||||
return loggingFunction != NULL && MTLogEnabledValue;
|
||||
}
|
||||
|
||||
void MTLog(NSString *format, ...) {
|
||||
@@ -26,3 +27,7 @@ void MTLog(NSString *format, ...) {
|
||||
void MTLogSetLoggingFunction(void (*function)(NSString *, va_list args)) {
|
||||
loggingFunction = function;
|
||||
}
|
||||
|
||||
void MTLogSetEnabled(bool enabled) {
|
||||
MTLogEnabledValue = enabled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user