mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 20:01:56 +03:00
42 lines
3.1 KiB
Objective-C
42 lines
3.1 KiB
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
#import "MSConstants.h"
|
|
|
|
#define MSLog(_level, _tag, _message) \
|
|
[MSLogger logMessage:_message level:_level tag:_tag file:__FILE__ function:__PRETTY_FUNCTION__ line:__LINE__]
|
|
#define MSLogAssert(tag, format, ...) \
|
|
MSLog(MSLogLevelAssert, tag, (^{ \
|
|
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
|
}))
|
|
#define MSLogError(tag, format, ...) \
|
|
MSLog(MSLogLevelError, tag, (^{ \
|
|
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
|
}))
|
|
#define MSLogWarning(tag, format, ...) \
|
|
MSLog(MSLogLevelWarning, tag, (^{ \
|
|
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
|
}))
|
|
#define MSLogInfo(tag, format, ...) \
|
|
MSLog(MSLogLevelInfo, tag, (^{ \
|
|
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
|
}))
|
|
#define MSLogDebug(tag, format, ...) \
|
|
MSLog(MSLogLevelDebug, tag, (^{ \
|
|
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
|
}))
|
|
#define MSLogVerbose(tag, format, ...) \
|
|
MSLog(MSLogLevelVerbose, tag, (^{ \
|
|
return [NSString stringWithFormat:(format), ##__VA_ARGS__]; \
|
|
}))
|
|
|
|
@interface MSLogger : NSObject
|
|
|
|
+ (void)logMessage:(MSLogMessageProvider)messageProvider
|
|
level:(MSLogLevel)loglevel
|
|
tag:(NSString *)tag
|
|
file:(const char *)file
|
|
function:(const char *)function
|
|
line:(uint)line;
|
|
|
|
@end
|