public void log()

in FlywayLambdaService/src/main/java/com/geekoosh/flyway/response/Response.java [28:54]


    public void log() {
        if(info == null) {
            logger.warn("No info available for this action");
            return;
        }
        String logInfo = "";
        if(info.getCurrent() != null) {
            logInfo = String.format("Current version: %s\n",
                    info.getCurrent().getVersion().getVersion()
            );
        }
        if(info.getApplied() != null) {
            logInfo += String.format("Applied migrations: %s, %s\n",
                    info.getApplied().length,
                    Arrays.stream(info.getApplied()).map(my -> "(" + (my.getVersion() == null ? "" : my.getVersion().getVersion()) + " [" + my.getScript() + "])")
                            .collect(Collectors.joining(", "))
            );
        }
        if(info.getPending() != null) {
            logInfo += String.format("Pending migrations: %s, %s\n",
                    info.getPending().length,
                    Arrays.stream(info.getPending()).map(my -> "(" + my.getVersion().getVersion() + " [" + my.getScript() + "])")
                            .collect(Collectors.joining(", "))
            );
        }
        logger.info(logInfo);
    }