code: public static void log(IoSession session, Logger logger, String message, Throwable t) {
          boolean isIOException = t instanceof IOException;
          if (isIOException && !logger.isInfoEnabled()) {
              return;
          }
          if (logger.isWarnEnabled()) {
              String finalMessage = t.getCause() == null ? message : message + ", caused by " + t.getCause();
              finalMessage = addSession(finalMessage, session);
              if (isIOException) {
                  logIOException(finalMessage, logger, t);
              }
              else if (logger.isInfoEnabled()) {
                  logger.warn(finalMessage, t);
              }
              else {
                  logger.warn(finalMessage);
              }
          }
      }
docs: Logs an unexpected exception in the same way LoggingFilter would.
  IOExceptions are treated specially because they are frequent and expected: they
  are logged only if info level is enabled.