Line 426... |
Line 426... |
426 |
if (mLogLevel > 0)
|
426 |
if (mLogLevel > 0)
|
427 |
{
|
427 |
{
|
428 |
if (TConfig::isLongFormat())
|
428 |
if (TConfig::isLongFormat())
|
429 |
*mStream << "Timestamp Type LNr., File name , ThreadID Message" << std::endl;
|
429 |
*mStream << "Timestamp Type LNr., File name , ThreadID Message" << std::endl;
|
430 |
else
|
430 |
else
|
431 |
*mStream << "Type LNr., Message" << std::endl;
|
431 |
*mStream << "Type LNr., ThreadID Message" << std::endl;
|
432 |
|
432 |
|
433 |
*mStream << "-----------------------------------------------------------------" << std::endl << std::flush;
|
433 |
*mStream << "-----------------------------------------------------------------" << std::endl << std::flush;
|
434 |
}
|
434 |
}
|
435 |
else
|
435 |
else
|
436 |
*mStream << std::flush;
|
436 |
*mStream << std::flush;
|
Line 616... |
Line 616... |
616 |
TError::setErrorType(TERRTRACE);
|
616 |
TError::setErrorType(TERRTRACE);
|
617 |
std::lock_guard<mutex> guardm(message_mutex);
|
617 |
std::lock_guard<mutex> guardm(message_mutex);
|
618 |
|
618 |
|
619 |
#if LOGPATH == LPATH_FILE
|
619 |
#if LOGPATH == LPATH_FILE
|
620 |
if (!TConfig::isLongFormat())
|
620 |
if (!TConfig::isLongFormat())
|
621 |
*TError::Current()->getStream() << "TRC " << std::setw(5) << std::right << line << ", " << indent << "{entry " << msg << std::endl;
|
621 |
*TError::Current()->getStream() << "TRC " << std::setw(5) << std::right << line << ", " << _threadIDtoStr(mThreadID) << " " << indent << "{entry " << msg << std::endl;
|
622 |
else
|
622 |
else
|
623 |
*TError::Current()->getStream() << TStreamError::getTime() << " TRC " << std::setw(5) << std::right << line << ", " << std::setw(20) << std::left << mFile << ", " << _threadIDtoStr(mThreadID) << " " << indent << "{entry " << msg << std::endl;
|
623 |
*TError::Current()->getStream() << TStreamError::getTime() << " TRC " << std::setw(5) << std::right << line << ", " << std::setw(20) << std::left << mFile << ", " << _threadIDtoStr(mThreadID) << " " << indent << "{entry " << msg << std::endl;
|
624 |
#else
|
624 |
#else
|
625 |
std::stringstream s;
|
625 |
std::stringstream s;
|
626 |
|
626 |
|
Line 663... |
Line 663... |
663 |
std::lock_guard<mutex> guardm(message_mutex);
|
663 |
std::lock_guard<mutex> guardm(message_mutex);
|
664 |
#if LOGPATH == LPATH_FILE
|
664 |
#if LOGPATH == LPATH_FILE
|
665 |
if (TConfig::getProfiling())
|
665 |
if (TConfig::getProfiling())
|
666 |
{
|
666 |
{
|
667 |
if (!TConfig::isLongFormat())
|
667 |
if (!TConfig::isLongFormat())
|
668 |
*TError::Current()->getStream() << "TRC , " << indent << "}exit " << mHeadMsg << " Elapsed time: " << nanosecs << std::endl;
|
668 |
*TError::Current()->getStream() << "TRC , " << _threadIDtoStr(mThreadID) << " " << indent << "}exit " << mHeadMsg << " Elapsed time: " << nanosecs << std::endl;
|
669 |
else
|
669 |
else
|
670 |
*TError::Current()->getStream() << TStreamError::getTime() << " TRC , " << std::setw(20) << std::left << mFile << ", " << _threadIDtoStr(mThreadID) << " " << indent << "}exit " << mHeadMsg << " Elapsed time: " << nanosecs << std::endl;
|
670 |
*TError::Current()->getStream() << TStreamError::getTime() << " TRC , " << std::setw(20) << std::left << mFile << ", " << _threadIDtoStr(mThreadID) << " " << indent << "}exit " << mHeadMsg << " Elapsed time: " << nanosecs << std::endl;
|
671 |
}
|
671 |
}
|
672 |
else
|
672 |
else
|
673 |
{
|
673 |
{
|
674 |
if (!TConfig::isLongFormat())
|
674 |
if (!TConfig::isLongFormat())
|
675 |
*TError::Current()->getStream() << "TRC , " << indent << "}exit " << mHeadMsg << std::endl;
|
675 |
*TError::Current()->getStream() << "TRC , " << _threadIDtoStr(mThreadID) << " " << indent << "}exit " << mHeadMsg << std::endl;
|
676 |
else
|
676 |
else
|
677 |
*TError::Current()->getStream() << TStreamError::getTime() << " TRC , " << std::setw(20) << std::left << mFile << ", " << _threadIDtoStr(mThreadID) << " " << indent << "}exit " << mHeadMsg << std::endl;
|
677 |
*TError::Current()->getStream() << TStreamError::getTime() << " TRC , " << std::setw(20) << std::left << mFile << ", " << _threadIDtoStr(mThreadID) << " " << indent << "}exit " << mHeadMsg << std::endl;
|
678 |
}
|
678 |
}
|
679 |
#else
|
679 |
#else
|
680 |
std::stringstream s;
|
680 |
std::stringstream s;
|
Line 853... |
Line 853... |
853 |
prefix = " ";
|
853 |
prefix = " ";
|
854 |
mErrType = TERRNONE;
|
854 |
mErrType = TERRNONE;
|
855 |
}
|
855 |
}
|
856 |
|
856 |
|
857 |
if (!TConfig::isLongFormat())
|
857 |
if (!TConfig::isLongFormat())
|
858 |
out = prefix;
|
858 |
out = prefix + _threadIDtoStr(mThreadID) + " ";
|
859 |
else
|
859 |
else
|
860 |
{
|
860 |
{
|
861 |
std::stringstream s;
|
861 |
std::stringstream s;
|
862 |
s << TStreamError::getTime() << " " << prefix << std::setw(20) << " " << ", " << _threadIDtoStr(mThreadID) << " ";
|
862 |
s << TStreamError::getTime() << " " << prefix << std::setw(20) << " " << ", " << _threadIDtoStr(mThreadID) << " ";
|
863 |
out = s.str();
|
863 |
out = s.str();
|