Android: Improve application output window by adding filters

- allow the user to choose the visible log levels
 - allow the user to choose which activities/service(s) logs are visible
 - wakeup the device (API 20+)
 - use only the most recent logs (API 21+ add "-T 0" to logcat params)
 - use logcat -v time format, which is the same on all Android versions

In the future we can even allow the user to choose which parts of the
log line are visible, e.g. time, log level, TAG, PID, Message

Task-number: QTCREATORBUG-16887
Change-Id: I07ce00aff59a479660f5ac6da75eef973ba3f627
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
BogDan Vatra
2016-10-10 15:38:50 +03:00
parent 8dc98995fa
commit d4ca232d54
6 changed files with 434 additions and 122 deletions

View File

@@ -186,6 +186,16 @@ AndroidDebugSupport::AndroidDebugSupport(AndroidRunConfiguration *runConfig,
QTC_ASSERT(m_runControl, return);
m_runControl->showMessage(output, AppOutput);
});
QTC_ASSERT(runControl, return);
auto formatter = qobject_cast<AndroidOutputFormatter*>(runControl->outputFormatter());
QTC_ASSERT(formatter, return);
connect(m_runner, &AndroidRunner::pidFound, formatter, &AndroidOutputFormatter::appendPid);
connect(m_runner, &AndroidRunner::pidLost, formatter, &AndroidOutputFormatter::removePid);
connect(m_runner, &AndroidRunner::remoteProcessFinished, formatter,
[formatter] {
formatter->removePid(-1);
});
}
void AndroidDebugSupport::handleRemoteProcessStarted(Utils::Port gdbServerPort, Utils::Port qmlPort)