Commit 412cb686 authored by Victor Poughon's avatar Victor Poughon

REFAC: display logger name in log

parent d6cb4b11
Pipeline #351 passed with stage
in 25 minutes and 54 seconds
......@@ -126,7 +126,14 @@ std::string Logger::BuildFormattedEntry(itk::Logger::PriorityLevelType level, st
assert(level <= std::extent<decltype(levelString)>::value);
return itksys::SystemTools::GetCurrentDateTime("%Y-%m-%d %H:%M:%S") + " " + levelString[level] + ": " + content;
if (strcmp(this->GetName(), "") == 0)
{
return itksys::SystemTools::GetCurrentDateTime("%Y-%m-%d %H:%M:%S") + " " + levelString[level] + ": " + content;
}
else
{
return itksys::SystemTools::GetCurrentDateTime("%Y-%m-%d %H:%M:%S") + " " + levelString[level] + " " + this->GetName() + ": " + 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