function getCustomListener(sMessagePattern, aLogs) {
		return {
			onLogEntry: function (oLogEntry) {
				var oRegExp = new RegExp(sMessagePattern);
				if (isOPALog(oLogEntry) && oRegExp.test(oLogEntry.component)) {
					aLogs.push(getLogText(oLogEntry));
				}
			}
		};
	}
A central place to collect logs during the execution of a task
Listens to sap/base/Log.* to collect the logs
Only collects logs from loggers with a certain component name
By default only logs from components in sap.ui.test are collected - this can be used to collect all the logs during an OPA test
You always need to start the collector to control when to actually collect logs

@class
@private
@alias sap.ui.test._LogCollector
@author SAP SE
@since 1.41