Search code examples
solace

Solace: How to switch off the info statements sent to std err from solace java api


currently seeing the following lines when running the solace client.

10-Feb-2016 11:14:13 com.solacesystems.jcsmp.protocol.impl.TcpClientChannel    call
INFO: Connecting to host 'orig=myhost.com, host=solacehost.com, port=55555'  (host 1 of 1, smfclient 4, attempt 1 of 1, this_host_attempt: 1 of 1)

Looked into JCSMPProperties class to control this but no luck.


Solution

  • Found the solution the solace API uses various logging libs, my project had commons-logging. Suppressing the log output was quite straight forward after knowing that using

    static {
          System.setProperty("org.apache.commons.logging.Log",
                             "org.apache.commons.logging.impl.NoOpLog");
       }