This is an automated email from the ASF dual-hosted git repository. lgoldstein pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mina-sshd.git
The following commit(s) were added to refs/heads/master by this push: new 4320886 [SSHD-977] Increase log level to error for scp error logs 4320886 is described below commit 4320886b19c8385ac017945d708680fad9c46f04 Author: sujeeva <suje...@paypal.com> AuthorDate: Sun Apr 12 19:12:52 2020 +0300 [SSHD-977] Increase log level to error for scp error logs --- .../java/org/apache/sshd/server/scp/ScpCommand.java | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/sshd-scp/src/main/java/org/apache/sshd/server/scp/ScpCommand.java b/sshd-scp/src/main/java/org/apache/sshd/server/scp/ScpCommand.java index e26f896..c4a2317 100644 --- a/sshd-scp/src/main/java/org/apache/sshd/server/scp/ScpCommand.java +++ b/sshd-scp/src/main/java/org/apache/sshd/server/scp/ScpCommand.java @@ -158,7 +158,8 @@ public class ScpCommand public void run() { int exitValue = ScpHelper.OK; String exitMessage = null; - ScpHelper helper = new ScpHelper(getServerSession(), in, out, fileSystem, opener, listener); + ServerSession session = getServerSession(); + ScpHelper helper = new ScpHelper(session, in, out, fileSystem, opener, listener); try { if (optT) { helper.receive(helper.resolveLocalPath(path), optR, optD, optP, receiveBufferSize); @@ -168,7 +169,6 @@ public class ScpCommand throw new IOException("Unsupported mode"); } } catch (IOException e) { - ServerSession session = getServerSession(); boolean debugEnabled = log.isDebugEnabled(); try { Integer statusCode = null; @@ -186,21 +186,17 @@ public class ScpCommand exitMessage = GenericUtils.trimToEmpty(e.getMessage()); writeCommandResponseMessage(command, exitValue, exitMessage); } catch (IOException e2) { + log.error("run({})[{}] Failed ({}) to send error response: {}", + session, command, e.getClass().getSimpleName(), e.getMessage()); if (debugEnabled) { - log.debug("run({})[{}] Failed ({}) to send error response: {}", - session, command, e.getClass().getSimpleName(), e.getMessage()); - } - if (log.isTraceEnabled()) { - log.trace("run(" + session + ")[" + command + "] error response failure details", e2); + log.error("run(" + session + ")[" + command + "] error response failure details", e2); } } + log.error("run({})[{}] Failed ({}) to run command: {}", + session, command, e.getClass().getSimpleName(), e.getMessage()); if (debugEnabled) { - log.debug("run({})[{}] Failed ({}) to run command: {}", - session, command, e.getClass().getSimpleName(), e.getMessage()); - } - if (log.isTraceEnabled()) { - log.trace("run(" + session + ")[" + command + "] command execution failure details", e); + log.error("run(" + session + ")[" + command + "] command execution failure details", e); } } finally { if (callback != null) {