38 #define __func__ __FUNCTION__ 41 #define DLOG(_title_) \ 42 DJI::OSDK::Log::instance() \ 43 .title((_title_), #_title_, __func__, __LINE__) \ 46 #define DLOG_PRIVATE(_title_) \ 47 DJI::OSDK::Log::instance() \ 48 .title((_title_), #_title_) \ 51 #define STATUS DJI::OSDK::Log::instance().getStatusLogState() 52 #define ERRORLOG DJI::OSDK::Log::instance().getErrorLogState() 53 #define DEBUG DJI::OSDK::Log::instance().getDebugLogState() 59 #define DSTATUS DLOG(STATUS) 60 #define DSTATUS_PRIVATE DLOG_PRIVATE(STATUS) 66 #define DERROR DLOG(ERRORLOG) 67 #define DERROR_PRIVATE DLOG_PRIVATE(ERRORLOG) 73 #define DDEBUG DLOG(DEBUG) 74 #define DDEBUG_PRIVATE DLOG_PRIVATE(DEBUG) 89 class Log :
public Singleton<Log>
97 Log&
title(
int level,
const char* prefix,
const char* func,
int line);
101 Log&
title(
int level,
const char* prefix);
142 bool getStatusLogState();
143 bool getDebugLogState();
144 bool getErrorLogState();
146 virtual Log& print(
const char* fmt, ...);
148 Log& operator<<(
bool val);
149 Log& operator<<(
short val);
150 Log& operator<<(uint16_t val);
151 Log& operator<<(
int val);
152 Log& operator<<(uint32_t val);
153 Log& operator<<(
long val);
154 Log& operator<<(
unsigned long val);
155 Log& operator<<(
long long val);
156 Log& operator<<(
unsigned long long val);
157 Log& operator<<(
float val);
158 Log& operator<<(
double val);
159 Log& operator<<(
long double val);
160 Log& operator<<(
void* val);
161 Log& operator<<(
char c);
162 Log& operator<<(uint8_t c);
163 Log& operator<<(int8_t c);
164 Log& operator<<(
const char* str);
172 typedef enum NUMBER_STYLE {
184 static const bool release =
false;
void disableDebugLogging()
Disable logging of status messages called through DDEBUG macro.
void enableStatusLogging()
Enable logging of status messages called through DSTATUS macro.
Logger for DJI OSDK supporting different logging channels.
Definition: dji_log.hpp:89
Log & title(int level, const char *prefix, const char *func, int line)
Singleton Template Class implementation for use with the DJI OSDK.
void enableDebugLogging()
Enable logging of status messages called through DDEBUG macro.
void enableErrorLogging()
Enable logging of status messages called through DERROR macro.
void disableStatusLogging()
Disable logging of status messages called through DSTATUS macro.
handle array of characters
Definition: commondatarangehandler.h:14
void disableErrorLogging()
Disable logging of status messages called through DERROR macro.
Definition: dji_thread_manager.hpp:41