class LoggingInterceptor implements Interceptor {

  private static final Logger logger = LoggerFactory.getLogger(LoggingInterceptor.class);
  private static final Pattern WHITESPACE_PATTERN = Pattern.compile("\\s+");

  @Override
  public Object intercept(Invocation invocation) throws Throwable {<FILL_FUNCTION_BODY>}
}

    Object target = invocation.getTarget();
    long startTime = System.currentTimeMillis();
    StatementHandler statementHandler = (StatementHandler) target;
    try {
      return invocation.proceed();
    } finally {
      long endTime = System.currentTimeMillis();
      long time = endTime - startTime;

      BoundSql boundSql = statementHandler.getBoundSql();
      String sql = WHITESPACE_PATTERN.matcher(boundSql.getSql()).replaceAll(" ");
      Object parameterObject = boundSql.getParameterObject();
      logger.info("Executing SQL: [{}, {}] takes {}ms", sql, parameterObject, time);
    }
  
<no_super_class>