Changes to add thread id to Log.

This commit is contained in:
Brad Arant 2020-04-23 14:21:06 -07:00
parent bf1db47043
commit 018c130df1
2 changed files with 4 additions and 7 deletions

View File

@ -13,11 +13,11 @@ namespace coreutils {
uri = in.getTokenExclude(" ");
if(!in.ifNext(" "))
throw coreutils::Exception("Expecting space after URI.");
protocol = in.getTokenExclude("\r\n");
protocol = in.getTokenExclude("\r");
coreutils::Log(coreutils::LOG_DEBUG_4) << "[" << in.str() << "]";
if(!in.ifNext("\r\n"))
if(!in.ifNext("\r"))
throw coreutils::Exception("Expecting CRLF after protocol.");
}

View File

@ -24,14 +24,11 @@ namespace coreutils {
clock_gettime(CLOCK_REALTIME, &timex);
temp << timex.tv_sec << "." << std::setfill('0') << std::setw(9) << timex.tv_nsec;
// auto clock = std::chrono::system_clock::now();
// time_t theTime = std::chrono::system_clock::to_time_t(clock);
// std::string timeOut = std::string(ctime(&theTime));
// timeOut = timeOut.substr(0, timeOut.length() - 1);
*this << temp.str();
*this << " ";
*this << "[" << syscall(SYS_gettid) << "]";
switch(level) {
case LOG_NONE:
*this << "[NONE] :";