Skip to content

Commit

Permalink
Make the logger less talkative
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Jan 13, 2019
1 parent 1f84c1e commit 1bc236d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/uiautomator2.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,12 @@ class UiAutomator2Server {
}
cmd.push(INSTRUMENTATION_TARGET);
const instrumentationProcess = this.adb.createSubProcess(['shell', ...cmd]);
instrumentationProcess.on('output', (stdout, stderr) => instrumentationLogger.debug(stdout || stderr));
instrumentationProcess.on('output', (stdout, stderr) => {
const output = stdout || stderr || '';
if (output.trim()) {
instrumentationLogger.debug(output.trim());
}
});
instrumentationProcess.on('exit', (code) => {
instrumentationLogger.debug(`The process has exited with code ${code}`);
if (_.isFunction(onExit)) {
Expand Down

0 comments on commit 1bc236d

Please sign in to comment.