Revert partially "Trim multi-line arguments for task name and ssh_log"

This reverts partially commit a0ae281aa9.

That commit prevent multi line arguments for ending up in the error_log,
output of show-queue command and in sshd_log by trimming the multi line
arguments. This commit reverts only the sshd_log part.

The original motivation for the other commit was mainly for error_log
and output of show-queue, same logic was applied to sshd_log for
consistency reasons. Trimming the multi line from sshd_log was a mistake
because we lose information that can be found no where else.

Change-Id: Ib9e5bdd7a935a2a0c969deb0c0e557bef976d251
This commit is contained in:
Hugo Arès 2018-03-02 13:27:43 -05:00
parent 612814ee48
commit 027af46ce8

View File

@ -14,7 +14,6 @@
package com.google.gerrit.sshd;
import com.google.common.base.Joiner;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.MultimapBuilder;
import com.google.gerrit.audit.AuditService;
@ -283,9 +282,9 @@ class SshLog implements LifecycleListener {
return "Command was already destroyed";
}
StringBuilder commandName = new StringBuilder(dcmd.getCommandName());
String[] trimmedArgs = dcmd.getTrimmedArguments();
if (trimmedArgs != null) {
commandName.append(Joiner.on(".").join(trimmedArgs));
String[] args = dcmd.getArguments();
for (int i = 1; i < args.length; i++) {
commandName.append(".").append(args[i]);
}
return commandName.toString();
}