Skip to content

Commit

Permalink
Apply the described changes in PR #55
Browse files Browse the repository at this point in the history
  • Loading branch information
tammoippen committed Jul 14, 2015
1 parent d037800 commit 45e513f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sli/interpret.cc
Expand Up @@ -880,7 +880,8 @@ SLIInterpreter::message( std::ostream& out,
std::strftime( timestring, buflen, "%b %d %H:%M:%S", std::localtime( &tm ) );

std::string msg = String::compose( "%1 %2 [%3]: ", timestring, from, levelname );
out << std::endl << msg << errorname;
out << std::endl
<< msg << errorname;

// Set the preferred line indentation.
const size_t indent = 4;
Expand All @@ -907,7 +908,8 @@ SLIInterpreter::message( std::ostream& out,
// Indent first message line
if ( text_str.size() != 0 )
{
std::cout << std::endl << std::string( indent, ' ' );
std::cout << std::endl
<< std::string( indent, ' ' );
}

size_t pos = 0;
Expand All @@ -919,7 +921,8 @@ SLIInterpreter::message( std::ostream& out,
// Print a lineshift followed by an indented whitespace
// Manually inserted lineshift at the end of the message
// are suppressed.
out << std::endl << std::string( indent, ' ' );
out << std::endl
<< std::string( indent, ' ' );
pos = 0;
}
else
Expand All @@ -942,7 +945,8 @@ SLIInterpreter::message( std::ostream& out,
if ( i != 0 && text_str.at( i - 1 ) == ' '
&& static_cast< int >( space - i ) > static_cast< int >( width - pos ) )
{
out << std::endl << std::string( indent, ' ' );
out << std::endl
<< std::string( indent, ' ' );
pos = 0;
}

Expand Down

0 comments on commit 45e513f

Please sign in to comment.