Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbedConnectorInterface by
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 +}