private void scannLog() {
        try {
            // When mysql is shutdown normally, a stop event will appears in the log file,
            // then should handle this situation.
            LogFileScanStatus status = LogFileScanStatus.SUCCESS;
            File logFile = new File(findCurrentLogFile());
            boolean isNewFile = false;
            while(true) {
                status = processor.onFileChange(logFile, isNewFile);
                if(status.equals(LogFileScanStatus.SUCCESS)) {
                    break;
                } else if(status.equals(LogFileScanStatus.STOP)) {
                    isNewFile = true;
                    logger.warn("Mysql DB service is shutdown.");
                } else if(status.equals(LogFileScanStatus.CONTINUE_NEXT)) {
                    logFile = findNextFile();
                    isNewFile = true;
                }
            }

        } catch (IOException e) {
            logger.error("Error happened when reading bin-log.");
            logger.error(ExceptionUtils.getStackTrace(e));
//            throw new RuntimeException(e);
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }