RedHat Fuse 6.1 disable logging of org.apache.camel.component.file.remote.SftpOperations

RedHat_Logo

Introduction
A few days ago I worked on a few (s)FTP components. I noticed the amount of logging done by JSCH was quite a lot and polluting our environment. With three SFTP components polling at 15-30 seconds the logging screen in Hawtio felt like it turned into a continuesly scrolling monster that ate my screen estate.Logger_JSCH

I decided to disable logging of this component and I found something funny, which should be solved by now.

The fix
Normally I use the pax 4j logging config file to specify logging of a deployed bundle. But in this case I tried the log:set command to change the log level of a certain component since the bundle logging setting in the pax 4j file did not change the logging for org.apache.camel.component.file.remote.SftpOperations.Logger_JSCH4

I did some research into it and it turned out there is more than one way to disable the flooding of messages by JSCH.
I did what I would normally do when pax 4j doesnt work, use the log:set but I performed the action on the full bundle name with the command: log:set ERROR org.apache.camel.component.file.remote.SftpOperationsLogger_JSCH3

Solved in the new version
This seemed to fix it, but there is still one logger there.Logger_JSCH2

We can see the JSCH is no longer logging, but we still get some flooding caused by a connection.
It’s still too much logging (at least in Hawtio) for my taste but I like this one a lot better.

I did some more research and I found a ticket in JIRA on the Camel site and discovered that they have fixed the logging level of this one last line to DEBUG instead of INFO.
Looking at JIRA, I understand that it has been implemented in the newer versions of Camel FTP.
At the time when I had this behaviour I was still running on Fuse 6.1 with Camel 2.12. Fuse 6.2 has some new and nice features, I guess this is another reason why you should start upgrading soon. I just upgraded to 6.2 and Java 8 and so far it seems all okay to me.

This was my first blog about JBoss Fuse, I hope you enjoyed it and have a very pleasent day.