YH_Log.m
960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// YH_Log.m
// YH_FRAME
//
// Created by Leo on 14-5-23.
// Copyright (c) 2014年 YOHO. All rights reserved.
//
#import "YH_Log.h"
@implementation YH_Log
+ (void)LogError:(NSString *)format, ... {
if (LOG_FLAG_ERROR & LOG_LEVEL) {
format = [NSString stringWithFormat:@"[ERROR] %@", format];
va_list args;
va_start(args, format);
NSLogv(format, args);
va_end(args);
}
}
+ (void)LogWarning:(NSString *)format, ... {
if (LOG_FLAG_WARN & LOG_LEVEL) {
format = [NSString stringWithFormat:@"[WARNING] %@", format];
va_list args;
va_start(args, format);
NSLogv(format, args);
va_end(args);
}
}
+ (void)LogInfo:(NSString *)format, ... {
if (LOG_FLAG_INFO & LOG_LEVEL) {
format = [NSString stringWithFormat:@"[INFO] %@", format];
va_list args;
va_start(args, format);
NSLogv(format, args);
va_end(args);
}
}
@end