A stream-based logger using any LogWriter. A Log instance corresponds to ONE log entry. More...
#include <log.h>
Public Member Functions | |
Log () | |
Log & | operator<< (int i) |
Log & | operator<< (uint32_t u32) |
Log & | operator<< (float f) |
Log & | operator<< (double d) |
Log & | operator<< (char c) |
Log & | operator<< (const std::string &s) |
Log & | operator<< (Log &(*f)(Log &)) |
Static Public Member Functions | |
static Log & | Info (Log &log) |
static Log & | Warn (Log &log) |
static Log & | Error (Log &log) |
static Log & | Fail (Log &log) |
static Log & | endl (Log &log) |
A stream-based logger using any LogWriter. A Log instance corresponds to ONE log entry.
Creating an instance provides the stream to which a log message is written. Specifying severity level and Log::endl are mandatory.
Log() << Log::Error << "This is an error" << Log::endl; Log() << Log::Info << "This is an information about " << some_integer << Log::endl
SCS::Log::Log | ( | ) |
create a new Logstream for ONE new message
Indicate the following message has severity Failure
Indicate the following message has severity Information
Log& SCS::Log::operator<< | ( | uint32_t | u32 | ) |
Log an unsigned 32 bit integer (CAN Id are stored in this format)
u32 |
Indicate the following message has severity Warnining