Skip to content
Permalink
Browse files

Server standalone better request log formatting

  • Loading branch information
elpaso committed Mar 5, 2020
1 parent b559a15 commit c1942a85915ba14315703b013924c557d567fae3
Showing with 8 additions and 6 deletions.
  1. +8 −6 src/server/qgis_mapserver.cpp
@@ -402,12 +402,14 @@ int main( int argc, char *argv[] )

// 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" )
.arg( clientConnection->peerAddress().toString() )
.arg( QDateTime::currentDateTime().toString() )
.arg( body.size() )
.arg( std::chrono::duration_cast<std::chrono::milliseconds>( elapsedTime ).count() )
.arg( firstLinePieces.join( ' ' ) )
.arg( response.statusCode() ).toStdString() << std::endl;
.arg( clientConnection->peerAddress().toString(),
QDateTime::currentDateTime().toString(),
QString::number( body.size() ),
QString::number( std::chrono::duration_cast<std::chrono::milliseconds>( elapsedTime ).count() ),
firstLinePieces.join( ' ' ),
QString::number( response.statusCode() ) )
.toStdString()
<< std::endl;

clientConnection->disconnectFromHost();
}

0 comments on commit c1942a8

Please sign in to comment.
You can’t perform that action at this time.