-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYXLog.h
54 lines (42 loc) · 1.43 KB
/
YXLog.h
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
43
44
45
46
47
48
49
50
51
52
53
54
//
// YXNSLog.h
//
// http://www.cnblogs.com/YouXianMing/
//
// Copyright (c) 2014年 Y.X. All rights reserved.
//
#import "YXLogConfig.h"
#if LOG_INFO
#define NSLogInfo(args...) ExtendNSLogInfo(__FILE__,__LINE__,__PRETTY_FUNCTION__,args);
void ExtendNSLogInfo(const char *file, int lineNumber, const char *functionName, NSString *format, ...);
#else
#define NSLogInfo(args...)
#endif
#if LOG_DEBUG
#define NSLogDebug(args...) ExtendNSLogDebug(__FILE__,__LINE__,__PRETTY_FUNCTION__,args);
void ExtendNSLogDebug(const char *file, int lineNumber, const char *functionName, NSString *format, ...);
#else
#define NSLogDebug(args...)
#endif
#if LOG_WARNING
#define NSLogWaring(args...) ExtendNSLogWarning(__FILE__,__LINE__,__PRETTY_FUNCTION__,args);
void ExtendNSLogWarning(const char *file, int lineNumber, const char *functionName, NSString *format, ...);
#else
#define NSLogWaring(args...)
#endif
#if LOG_ERROR
#define NSLogError(args...) ExtendNSLogError(__FILE__,__LINE__,__PRETTY_FUNCTION__,args);
void ExtendNSLogError(const char *file, int lineNumber, const char *functionName, NSString *format, ...);
#else
#define NSLogError(args...)
#endif
#if LOG_TRACE
#define NSLogTrace(args...) ExtendNSLogTrace(__FILE__,__LINE__,__PRETTY_FUNCTION__,args);
void ExtendNSLogTrace(const char *file, int lineNumber, const char *functionName, NSString *format, ...);
#else
#define NSLogTrace(args...)
#endif
#if LOG_NSLOG
#else
#define NSLog(args...)
#endif