code: public String subQuery(String sql) {
      if (options.maxQuerySizeToLog > 0 && sql.length() > options.maxQuerySizeToLog - 3) {
        return sql.substring(0, options.maxQuerySizeToLog - 3) + "...";
      }
      return sql;
    }
docs: Get query, truncated if to big.
  
  @param sql current query
  @return possibly truncated query if too big