63 while (*strInput !=
'\0')
65 const char* pItemStart = strInput;
66 adtf::util::cParserHelper::SeekChars(strInput,
"\t",
true);
67 if (*strInput ==
'\0')
72 tTimeStamp nTimeStamp = adtf::util::cString(pItemStart, strInput - pItemStart).AsInt64();
76 pItemStart = strInput;
77 adtf::util::cParserHelper::SeekChars(strInput,
"\t",
true);
78 if (*strInput ==
'\0')
83 uint32_t value = adtf::util::cString(pItemStart, strInput - pItemStart).AsUInt32();
84 if (value > std::numeric_limits<uint8_t>::max())
88 RETURN_ERROR_DESC(ERR_INVALID_ARG,
"Detected value which is greater than the maximum possible value of nLogLevel");
92 uint8_t nLogLevel =
static_cast<uint8_t
>(value);
94 pItemStart = strInput;
95 adtf::util::cParserHelper::SeekChars(strInput,
"\t",
true);
96 if (*strInput ==
'\0')
101 adtf::util::cString strMessage = adtf::util::cString(pItemStart, strInput - pItemStart).Unescape();
104 pItemStart = strInput;
105 adtf::util::cParserHelper::SeekChars(strInput,
"\n",
true);
106 if (*strInput ==
'\0')
111 adtf::util::cString strSource = adtf::util::cString(pItemStart, strInput - pItemStart).Unescape();
113 if (nTimeStamp == 0 && nLogLevel == 0)
117 oLogger({nTimeStamp, nLogLevel, strMessage, strSource});
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_ERROR_DESC(_code,...)
Same as RETURN_ERROR(_error) using a printf like parameter list for detailed error description.
Definition result.h:44
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29