2

My camel SFTP consumer connects to server every 10 seconds and during every connect it prints huge log messages as mentioned here.

02-05-2016 20:48:34,441 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> kex: client: hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96

02-05-2016 20:48:34,441 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> kex: client: none

02-05-2016 20:48:34,441 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> kex: client: none

02-05-2016 20:48:34,441 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> kex: client:

02-05-2016 20:48:34,441 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> kex: client:

02-05-2016 20:48:34,441 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> kex: server->client aes128-ctr hmac-md5 none

02-05-2016 20:48:34,441 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> kex: client->server aes128-ctr hmac-md5 none

02-05-2016 20:48:34,443 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> SSH_MSG_KEXDH_INIT sent

02-05-2016 20:48:34,444 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> expecting SSH_MSG_KEXDH_REPLY

02-05-2016 20:48:34,762 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> ssh_rsa_verify: signature true

02-05-2016 20:48:34,762 WARN (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> Permanently added '11.11.11.11' (RSA) to the list of known hosts.

02-05-2016 20:48:34,763 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> SSH_MSG_NEWKEYS sent

02-05-2016 20:48:34,763 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> SSH_MSG_NEWKEYS received

02-05-2016 20:48:34,763 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> SSH_MSG_SERVICE_REQUEST sent

02-05-2016 20:48:35,079 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> SSH_MSG_SERVICE_ACCEPT received

02-05-2016 20:48:35,391 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> Authentications that can continue: publickey,keyboard-interactive,password

02-05-2016 20:48:35,391 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> Next authentication method: publickey

02-05-2016 20:48:35,391 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> Authentications that can continue: password

02-05-2016 20:48:35,391 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> Next authentication method: password

02-05-2016 20:48:35,707 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> Authentication succeeded (password).

02-05-2016 20:48:36,662 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] Connected to sftp://username@11.11.11.11:22

02-05-2016 20:48:36,662 INFO (org.apache.camel.component.file.remote.SftpConsumer) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] Connected and logged in to: sftp://username@11.11.11.11:22

02-05-2016 20:48:38,539 INFO (org.apache.camel.component.file.remote.SftpOperations) [Camel (camel-99) thread #117 - sftp://username:******@11.11.11.11:22/download] JSCH -> Disconnecting from 11.11.11.11 port 22

How can I stop these messages from appearing in the log?

рüффп
  • 5,172
  • 34
  • 67
  • 113
shakti
  • 33
  • 4

2 Answers2

1

If you are using a logger like log4j, you can simply turn off the JSCH logging with the following line in your logger config:

log4j.logger.org.apache.camel.component.file.remote.SftpOperations = OFF
рüффп
  • 5,172
  • 34
  • 67
  • 113
Ramin Arabbagheri
  • 790
  • 2
  • 11
  • 25
1

As an alternative to change the logger config, the current Camel sFTP documentation mentions few options you can set on the endpoint:

  • jschLoggingLevel
  • readLockLoggingLevel
  • runLoggingLevel

For example you can set:

sftp://user@myserver.mydomain.net:9921/path/to/folder?binary=true&jschLoggingLevel=WARN&readLockLoggingLevel=INFO&runLoggingLevel=WARN

You can tweak each category to fit your needs directly in the endpoint without changing the configuration of your logger.

рüффп
  • 5,172
  • 34
  • 67
  • 113