DJI Onboard SDK  4.0
Public Member Functions | List of all members
DJI::OSDK::Log Class Reference

Logger for DJI OSDK supporting different logging channels. More...

#include <dji_log.hpp>

Inherits DJI::OSDK::Singleton< T >.

Public Member Functions

 Log (Mutex *m=0)
 
Logtitle (int level, const char *prefix, const char *func, int line)
 
Logtitle (int level, const char *prefix)
 
Logprint ()
 
void enableStatusLogging ()
 Enable logging of status messages called through DSTATUS macro. More...
 
void disableStatusLogging ()
 Disable logging of status messages called through DSTATUS macro. More...
 
void enableDebugLogging ()
 Enable logging of status messages called through DDEBUG macro. More...
 
void disableDebugLogging ()
 Disable logging of status messages called through DDEBUG macro. More...
 
void enableErrorLogging ()
 Enable logging of status messages called through DERROR macro. More...
 
void disableErrorLogging ()
 Disable logging of status messages called through DERROR macro. More...
 
bool getStatusLogState ()
 
bool getDebugLogState ()
 
bool getErrorLogState ()
 
virtual Logprint (const char *fmt,...)
 
Logoperator<< (bool val)
 
Logoperator<< (short val)
 
Logoperator<< (uint16_t val)
 
Logoperator<< (int val)
 
Logoperator<< (uint32_t val)
 
Logoperator<< (long val)
 
Logoperator<< (unsigned long val)
 
Logoperator<< (long long val)
 
Logoperator<< (unsigned long long val)
 
Logoperator<< (float val)
 
Logoperator<< (double val)
 
Logoperator<< (long double val)
 
Logoperator<< (void *val)
 
Logoperator<< (char c)
 
Logoperator<< (uint8_t c)
 
Logoperator<< (int8_t c)
 
Logoperator<< (const char *str)
 

Detailed Description

Logger for DJI OSDK supporting different logging channels.

The Log class is a singleton and contains some pre-defined logging levels. The class provides methods to turn on or off these predefined logging levels. Users can also create their own logging channels using the DLOG macro.

Member Function Documentation

◆ disableDebugLogging()

void DJI::OSDK::Log::disableDebugLogging ( )

Disable logging of status messages called through DDEBUG macro.

Call this method on the DJI::OSDK::Log.instance() in your program.

◆ disableErrorLogging()

void DJI::OSDK::Log::disableErrorLogging ( )

Disable logging of status messages called through DERROR macro.

Call this method on the DJI::OSDK::Log.instance() in your program.

◆ disableStatusLogging()

void DJI::OSDK::Log::disableStatusLogging ( )

Disable logging of status messages called through DSTATUS macro.

Call this method on the DJI::OSDK::Log.instance() in your program.

◆ enableDebugLogging()

void DJI::OSDK::Log::enableDebugLogging ( )

Enable logging of status messages called through DDEBUG macro.

Call this method on the DJI::OSDK::Log.instance() in your program.

◆ enableErrorLogging()

void DJI::OSDK::Log::enableErrorLogging ( )

Enable logging of status messages called through DERROR macro.

Call this method on the DJI::OSDK::Log.instance() in your program.

◆ enableStatusLogging()

void DJI::OSDK::Log::enableStatusLogging ( )

Enable logging of status messages called through DSTATUS macro.

Call this method on the DJI::OSDK::Log.instance() in your program.

◆ title() [1/2]

Log& DJI::OSDK::Log::title ( int  level,
const char *  prefix,
const char *  func,
int  line 
)
Note
if title level is 0, this log would not be print at all this feature is used for dynamical/statical optional log output

◆ title() [2/2]

Log& DJI::OSDK::Log::title ( int  level,
const char *  prefix 
)
Note
Used for closed source logging, where we don't want to print function name and line number

The documentation for this class was generated from the following file: