javaloggingspring-bootspring-websocketsockjs

Disable INFO level logging for Spring boot websocket MessageBroker logs


I have a spring boot application with Websocket enabled wit SockJs. All works nice but it keeps logging below message in the console.

2017-09-19 11:04:48.164  INFO 8856 --- [MessageBroker-4] o.s.w.s.c.WebSocketMessageBrokerStats    : WebSocketSession[1 current WS(1)-HttpStream(0)-HttpPoll(0), 3 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(3)-CONNECTED(3)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 45], outboundChannelpool size = 0, active threads = 0, queued tasks = 0, completed tasks = 22], sockJsScheduler[pool size = 4, active threads = 1, queued tasks = 2, completed tasks = 65909]

What is the significance of the log and how can I disable only these type of logging?


Solution

  • Try to use following configuration in application.properties:

    logging.level.org.springframework.web.socket.config.WebSocketMessageBrokerStats = ERROR
    

    this will upgrade logs for this particular class.