Skip to content

Commit

Permalink
adapt log level to warn in case the SSH tunnel failed;
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
  • Loading branch information
Stefan Maute committed Feb 16, 2022
1 parent e66bf38 commit 9cba450
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,13 @@ private void handleAuthResult(final AuthFuture authFuture) {

private void handleTunnelClosed(final TunnelClosed tunnelClosed) {
if (tunnelClosed.getError() != null) {
connectionLogger.failure("SSH Tunnel failed: {0}", getMessage(tunnelClosed.getError()));
logger.debug("SSH Tunnel failed: {0}", getMessage(tunnelClosed.getError()));
final String message = String.format("SSH Tunnel failed: %s", getMessage(tunnelClosed.getError()));
connectionLogger.failure(message);
logger.warning(message);
} else {
connectionLogger.success("SSH Tunnel closed");
logger.debug("SSH Tunnel closed");
final String msg = "SSH Tunnel closed";
connectionLogger.success(msg);
logger.debug(msg);
}
notifyParentAndCleanup(tunnelClosed);
}
Expand Down

0 comments on commit 9cba450

Please sign in to comment.