Skip to content

Commit

Permalink
Logfile: Ajdust plain format.
Browse files Browse the repository at this point in the history
Made the location column broader, as ressys/ResourceMangager.inl:xx was
overflowing.
I did not remember that the Logfile code was *that* bad. I should switch to
Boost.Log as soon as it is released.
  • Loading branch information
Oberon00 committed Jun 25, 2013
1 parent 63b4aa3 commit be95e95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Logfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ void Logfile::open(const std::string& filename, logstyle::T style)
"<td>Level</td> <td>Time(s)</td> <td>Location</td> <td>Message</td> </tr></thead><tbody>\n";
} else {
m_file << "===< LOGFILE >===\n\n"
"Level Time(s) Location Message\n"
"---------- ---------- ---------------------------- ----------" \
"Level Time(s) Location Message\n"
"---------- ---------- ------------------------------------- ----------" \
"----------------------------------------\n";
}
LOG_I("Start logging at " + full_time());
Expand Down Expand Up @@ -172,7 +172,7 @@ void Logfile::write(std::string const& msg, loglevel::T level, char const* locat
}
else // if (m_style == logstyle::plain)
{
fmt = levelpreambles[level] + str(boost::format("%|-8|") % levelnames[level]) + "%|10| %|-28| %||";
fmt = levelpreambles[level] + str(boost::format("%|-8|") % levelnames[level]) + "%|9| %|-37| %||";
std::string msg2 = msg;
if (msg.back() == '\n')
msg2.pop_back();
Expand All @@ -181,7 +181,7 @@ void Logfile::write(std::string const& msg, loglevel::T level, char const* locat
for (const char c : msg2) switch (c)
{
case '\n':
real_msg += "\n" + std::string(52, ' ');
real_msg += "\n" + std::string(60, ' ');
break;
default:
real_msg += c;
Expand Down

0 comments on commit be95e95

Please sign in to comment.