All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.highway2urhell.reporter.LoggerReporter Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package com.highway2urhell.reporter;

import com.google.gson.Gson;
import com.highway2urhell.domain.FrameworkInformations;
import com.highway2urhell.service.ReporterService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LoggerReporter implements ReporterService {
    private static final Logger LOG = LoggerFactory
            .getLogger(LoggerReporter.class);

    @Override
    public void report(FrameworkInformations frameworkInformations) {
        if (frameworkInformations.hasEntryPaths()) {
            LOG.info("framework {} version {}",
                    frameworkInformations.getFrameworkName(),
                    frameworkInformations.getVersion());
            LOG.info("{} urls found", frameworkInformations.getListEntryPath()
                    .size());
            if (LOG.isDebugEnabled()) {
                Gson gson = new Gson();
                LOG.debug(" JSON elements :"
                        + gson.toJson(frameworkInformations.getListEntryPath()));
            }
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy