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
| //
| // TuyaSmartSDK+Log.h
| // TuyaSmartBaseKit
| //
| // Copyright (c) 2014-2021 Tuya Inc. (https://developer.tuya.com)
|
| #import "TuyaSmartSDK.h"
|
| NS_ASSUME_NONNULL_BEGIN
|
|
| void TYSDKLog(NSInteger level, NSString *module, const char *file, const char *function, NSUInteger line, NSString *format, ...);
|
| #undef TYLog
| #undef TYSDKLogDebug
| #undef TYSDKLogInfo
| #undef TYSDKLogWarn
| #undef TYSDKLogError
|
| #define TYLog(...) \
| TYSDKLog(1, @"TuyaSmartHomeKit", __FILE__, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
| #define TYSDKLogDebug(...) \
| TYSDKLog(0, @"TuyaSmartHomeKit", __FILE__, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
| #define TYSDKLogInfo(...) \
| TYSDKLog(1, @"TuyaSmartHomeKit", __FILE__, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
| #define TYSDKLogWarn(...) \
| TYSDKLog(2, @"TuyaSmartHomeKit", __FILE__, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
| #define TYSDKLogError(...) \
| TYSDKLog(3, @"TuyaSmartHomeKit", __FILE__, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
|
| @interface TuyaSmartSDK (Log)
|
| /// Debug mode
| @property (nonatomic, assign) BOOL debugMode;
|
| @end
|
| NS_ASSUME_NONNULL_END
|
|