mbed Connector Endpoint interface. This interface permits a mbed endpoint to easily setup MDS resources and emit those resources to an MDS server.
Dependents: IoT_LED_demo ServoTest uWater_Project hackathon ... more
Diff: api/Logger.cpp
- Revision:
- 2:853f9ecc12df
- Parent:
- 0:b438482ebbfc
- Child:
- 5:a929d65eb385
--- a/api/Logger.cpp Tue Jan 27 22:52:25 2015 +0000 +++ b/api/Logger.cpp Tue Jan 27 23:41:34 2015 +0000 @@ -3,7 +3,7 @@ * @brief mbed CoAP Endpoint logging class * @author Doug Anson/Chris Paola * @version 1.0 - * @see + * @see * * Copyright (c) 2014 * @@ -19,25 +19,29 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - #include "Logger.h" - - // Constructor - Logger::Logger(const BufferedSerial *pc) { - this->m_pc = (BufferedSerial *)pc; - } - - // Copy Constructor - Logger::Logger(const Logger &logger) { - this->m_pc = logger.m_pc; - } - - // Destructor - Logger::~Logger() { - } - - // Log output - void Logger::log(const char *format,...) { + +#include "Logger.h" + +// Constructor +Logger::Logger(const BufferedSerial *pc) +{ + this->m_pc = (BufferedSerial *)pc; +} + +// Copy Constructor +Logger::Logger(const Logger &logger) +{ + this->m_pc = logger.m_pc; +} + +// Destructor +Logger::~Logger() +{ +} + +// Log output +void Logger::log(const char *format,...) +{ va_list args; va_start(args,format); if (this->m_pc != NULL) { @@ -45,10 +49,9 @@ //this->m_pc->printf("\r\n"); std::printf(format,args); std::printf("\r\n"); - } - else { + } else { std::printf(format,args); std::printf("\r\n"); } va_end(args); - } \ No newline at end of file +}