Skip to content

Commit

Permalink
Server standalone colorize output
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 23, 2020
1 parent 98ba41c commit 7272f27
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 7272f27

Please sign in to comment.