|
| enum | MessageType : uint8_t {
Emergency = 0x00
, Alert = 0x01
, Error = 0x02
, Warning = 0x03
,
Notice = 0x04
, Info = 0x05
, Debug = 0x06
, Trace = 0x07
} |
| |
| enum | Output : uint8_t { NoConsole = 0x08
} |
| |
| enum | Color : uint8_t {
Default = 0x00
, White = 0x10
, Gray = 0x20
, Black = 0x30
,
Red = 0x40
, Green = 0x50
, Blue = 0x60
, Cyan = 0x70
,
Magenta = 0x80
, Yellow = 0x90
, DarkRed = 0xa0
, DarkGreen = 0xb0
,
DarkBlue = 0xc0
, DarkCyan = 0xd0
, DarkMagenta = 0xe0
, DarkYellow = 0xf0
} |
| |
|
|
| LogStream (uint8_t, const char *, const char *, int, uint8_t=0) |
| |
|
template<typename T> |
| LogStream & | operator<< (T val) |
| |
|
LogStream & | operator<< (decltype(std::endl< char, std::char_traits< char > >) &) |
| |
|
LogStream & | operator<< (const Color) |
| |
|
LogStream & | operator<< (const int8_t) |
| |
|
LogStream & | operator<< (const uint8_t) |
| |
|
LogStream & | operator<< (const char *) |
| |
|
LogStream & | operator<< (char *) |
| |
|
template<typename... Args> |
| LogStream & | output (std::format_string< Args... > msg, Args &&...args) |
| |
|
LogStream & | output () |
| |
|
LogStream & | output (const std::string &) |
| |
|
LogStream & | space () |
| |
|
LogStream & | nospace () |
| |
|
LogStream & | flush () |
| |
|
|
static void | message (const Message &m, uint8_t f=LOG_STREAM_CONSOLE_COLOR|LOG_STREAM_CONSOLE_EXTEND) |
| |
|
static void | console_output (const Message &, uint8_t=LOG_STREAM_CONSOLE_COLOR|LOG_STREAM_CONSOLE_EXTEND) |
| |
|
static std::string | levelName (uint8_t) |
| |
|
static std::string | colorString (Color) |
| |
|
static std::string | sender (const char *) |
| |
|
static std::string | timeString (const uint64_t, const TimeFormat &={}) |
| |
|
static std::string | currentTimeString (const TimeFormat &={}) |
| |
|
static void | setTimeFormat (const std::string &, bool=false) |
| |
|
static void | setTimeOffset (int) |
| |
|
static void | setCompleted (void(*_completed)(const Message &, uint8_t)) |
| |
|
static void | setFunctionPrefixIgnoreList (const std::vector< std::string > &list) |
| |
|
static void | setSenderPrefix (const std::string &prefix) |
| |
The LogStream class.
Examlpe:
lsTrace() << "Trace";
lsDebug() << "Debug";
lsInfo() << "Info";
lsInfoRed() << "Info red";
lsInfoGreen() << "Info green";
lsInfoBlue() << "Info blue";
lsInfoMagenta() << "Info magenta";
lsInfoCyan() << "Info cyan";
lsNotice() << "Notice";
lsWarning() << "Warning";
lsError() << "Error";
logTrace() << "Trace";
logDebug() << "Debug";
logInfo() << "Info";
logNotice() << "Notice";
logWarning() << "Warning";
logError() << "Error";
logAlert() << "logAlert";
logEmergency() << "Emergency";