A common library used by Digi International Inc. mbed libraries to output debug information.
Dependents: XBeeLib XBeeLib_Test Chi-XBee-Actuator Chi-XBee-Sensor ... more
A common library used by Digi International Inc. mbed libraries to output debug information.
Used by XBeeLib
See Debugging the library chapter for more info.
Revision 5:58c5158b5120, committed 2015-06-01
- Comitter:
- spastor
- Date:
- Mon Jun 01 18:59:28 2015 +0200
- Parent:
- 4:b67d49554d8c
- Commit message:
- Automatic upload
Changed in this revision
diff -r b67d49554d8c -r 58c5158b5120 DigiLogger.cpp --- a/DigiLogger.cpp Mon May 18 13:16:43 2015 +0200 +++ b/DigiLogger.cpp Mon Jun 01 18:59:28 2015 +0200 @@ -25,13 +25,13 @@ { _log_level = LogLevelNone; - current_logger = nullptr; + current_logger = NULL; } /* Class destructor */ DigiLogger::~DigiLogger() { - current_logger = nullptr; + current_logger = NULL; } void DigiLogger::set_level(LogLevel log_level) @@ -49,11 +49,13 @@ static char buffer[DEBUG_BUFFER_LEN]; va_list argp; - if (current_logger == nullptr) + if (current_logger == NULL) { return; + } - if (_log_level < log_level) + if (_log_level < log_level) { return; + } va_start(argp, format); vsnprintf(buffer, DEBUG_BUFFER_LEN, format, argp);
diff -r b67d49554d8c -r 58c5158b5120 DigiLogger.h --- a/DigiLogger.h Mon May 18 13:16:43 2015 +0200 +++ b/DigiLogger.h Mon Jun 01 18:59:28 2015 +0200 @@ -34,14 +34,10 @@ }; /** * @} - */ + */ #define DEBUG_BUFFER_LEN 200 -#ifndef nullptr -#define nullptr NULL -#endif - namespace DigiLog { class DigiLogger @@ -63,8 +59,6 @@ /** Class destructor */ virtual ~DigiLogger(); - - /********************** Actions and accessor member methods ***********************/ /** set_level - set logging level. * @@ -76,7 +70,7 @@ * * @returns current overall logging level */ - static LogLevel get_level(); + static LogLevel get_level(); /** log_format - logs a printf-like message. *
diff -r b67d49554d8c -r 58c5158b5120 DigiLoggerMbedSerial.cpp --- a/DigiLoggerMbedSerial.cpp Mon May 18 13:16:43 2015 +0200 +++ b/DigiLoggerMbedSerial.cpp Mon Jun 01 18:59:28 2015 +0200 @@ -29,14 +29,15 @@ /* Class destructor */ DigiLoggerMbedSerial::~DigiLoggerMbedSerial() { - _log_serial = nullptr; - DigiLogger::current_logger = nullptr; + _log_serial = NULL; + DigiLogger::current_logger = NULL; } void DigiLoggerMbedSerial::log_buffer(char const * const buffer) { - if (_log_serial == nullptr) + if (_log_serial == NULL) { return; + } _log_serial->printf("%s", buffer); fflush(*_log_serial);