Skip to content

Commit

Permalink
Merge pull request #39567 from elpaso/server-standalone-colorize
Browse files Browse the repository at this point in the history
Server standalone colorize output
  • Loading branch information
elpaso committed Oct 30, 2020
2 parents ce466a4 + 7272f27 commit f5ba02e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/qgis_mapserver.cpp
Expand Up @@ -417,7 +417,7 @@ int main( int argc, char *argv[] )
clientConnection->write( body );

// 10.185.248.71 [09/Jan/2015:19:12:06 +0000] 808840 <time> "GET / HTTP/1.1" 500"
std::cout << QStringLiteral( "%1 [%2] %3 %4ms \"%5\" %6" )
std::cout << QStringLiteral( "\033[1;92m%1 [%2] %3 %4ms \"%5\" %6\033[0m" )
.arg( clientConnection->peerAddress().toString(),
QDateTime::currentDateTime().toString(),
QString::number( body.size() ),
Expand All @@ -443,7 +443,7 @@ int main( int argc, char *argv[] )
clientConnection->write( "\r\n" );
clientConnection->write( ex.message().toUtf8() );

std::cout << QStringLiteral( "%1 [%2] \"%3\" - - 500" )
std::cout << QStringLiteral( "\033[1;31m%1 [%2] \"%3\" - - 500\033[0m" )
.arg( clientConnection->peerAddress().toString() )
.arg( QDateTime::currentDateTime().toString() )
.arg( ex.message() ).toStdString() << std::endl;
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit f5ba02e

Please sign in to comment.