30 lines
481 B
Objective-C
30 lines
481 B
Objective-C
#import <Foundation/Foundation.h>
|
|
#import "TLogUtil.h"
|
|
|
|
@interface TLogUtil()
|
|
@property(nonatomic,assign) BOOL isDebug;
|
|
@end
|
|
|
|
|
|
@implementation TLogUtil
|
|
|
|
+ (instancetype)sharedInstance{
|
|
static TLogUtil *myInstance = nil;
|
|
if(myInstance == nil){
|
|
myInstance = [[TLogUtil alloc]init];
|
|
}
|
|
return myInstance;
|
|
}
|
|
|
|
- (void)debug:(BOOL)isDebug{
|
|
_isDebug = isDebug;
|
|
}
|
|
|
|
- (void)print:(NSString *)message{
|
|
if(_isDebug){
|
|
GLog(@"%@", message);
|
|
}
|
|
}
|
|
|
|
@end
|