Xsens DOT iOS SDK  ©2022 Xsens Technologies - Version: 2022.0.0
XsensDotLog.h
Go to the documentation of this file.
1 //
2 // XsensDotLog.h
3 // XsensDotSdk
4 //
5 // Created by Jayson on 2020/4/18.
6 // Copyright © 2020 Xsens. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 
11 NS_ASSUME_NONNULL_BEGIN
12 
13 #ifndef XSDotSDKLogTitle
14 #define XSDotSDKLogTitle @"[XSDotSDK]"
15 #endif
16 
17 /*
18  Log when debug in development
19 */
20 
21 #ifdef DEBUG
22 #define NSLogObject(obj) NSLog(@"%@", obj)
23 #define NSLogFunction() NSLog(@"%s", __FUNCTION__)
24 #define NSLogFunctionWithInfo(obj) NSLog(@"%s:%@", __FUNCTION__, obj)
25 #define NSLogFunctionFormat(format, args...) NSLog(@"%s:" format, __FUNCTION__, args)
26 #else
27 #define NSLogObject(obj) if([XsensDotLog isLogEnable]) { NSLog(@"%@ %@", XSDotSDKLogTitle, obj); }
28 #define NSLogFunction() if([XsensDotLog isLogEnable]) { NSLog(@"%@ %s", XSDotSDKLogTitle, __FUNCTION__); }
29 #define NSLogFunctionWithInfo(obj) if([XsensDotLog isLogEnable]) { NSLog(@"%@ %s:%@", XSDotSDKLogTitle, __FUNCTION__, obj); }
30 #define NSLogFunctionFormat(format, args...) if([XsensDotLog isLogEnable]) { NSLog(@"%@ %s:" format, XSDotSDKLogTitle, __FUNCTION__, args); }
31 #endif
32 
33 
37 @interface XsensDotLog : NSObject
38 
43 + (void)setLogEnable:(BOOL)enable;
44 
49 + (BOOL)isLogEnable;
50 
51 @end
52 
53 NS_ASSUME_NONNULL_END
Definition: XsensDotLog.h:38
BOOL isLogEnable()