Skip to content
Permalink
Browse files

indent multiline messages in log

  • Loading branch information
jef-n committed Sep 14, 2014
1 parent 93e2159 commit 342ad2b75324acd27a0f12f792451ec5b8d2d682
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/gui/qgsmessagelogviewer.cpp
@@ -145,9 +145,10 @@ void QgsMessageLogViewer::logMessage( QString message, QString tag, QgsMessageLo
tabWidget->setCurrentIndex( tabWidget->count() - 1 );
}

QString date = QDateTime::currentDateTime().toString( Qt::ISODate );
message = message.replace( "\n", "<br>" );
w->appendHtml( QString("<i>%1</i> | <i>%2</i> | %3").arg( date ).arg( QString::number( level ) ).arg( message ) );
QString prefix = QString( "%1\t%2\t")
.arg( QDateTime::currentDateTime().toString( Qt::ISODate ) )
.arg( level );
w->appendPlainText( message.prepend( prefix ).replace( "\n", "\n\t\t\t" ) );
w->verticalScrollBar()->setValue( w->verticalScrollBar()->maximum() );
}

0 comments on commit 342ad2b

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