Commit d6cb4b11 authored by Victor Poughon's avatar Victor Poughon

REFAC: refactor otb::Logger::BuildFormattedEntry

parent d889bdf3
Pipeline #349 passed with stage
in 35 minutes and 45 seconds
......@@ -126,25 +126,7 @@ std::string Logger::BuildFormattedEntry(itk::Logger::PriorityLevelType level, st
assert(level <= std::extent<decltype(levelString)>::value);
std::ostringstream s;
switch (this->m_TimeStampFormat)
{
case REALVALUE:
{
s.precision(30);
s << m_Clock->GetTimeInSeconds();
break;
}
case HUMANREADABLE:
{
s << itksys::SystemTools::GetCurrentDateTime(this->m_HumanReadableFormat.c_str());
break;
}
}
s << " " << levelString[level] << ": " << content;
return s.str();
return itksys::SystemTools::GetCurrentDateTime("%Y-%m-%d %H:%M:%S") + " " + levelString[level] + ": " + content;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment