Examples of PluginLogger


Examples of com.dtolabs.rundeck.plugins.PluginLogger

        return null != integer && integer <= level;
    }

    public void log(int level, String message) {
        BaseLogger baseLogger1 = baseLogger.get();
        PluginLogger pluginLogger1 = pluginLogger.get();
        if (null != baseLogger1) {
            switch (level) {
                case Logger.FATAL:
                case Logger.ERROR:
                    baseLogger1.error(message);
                    break;
                case Logger.WARN:
                    baseLogger1.warn(message);
                    break;
                case Logger.DEBUG:
                    baseLogger1.debug(message);
                    break;
                case Logger.INFO:
                default:
                    baseLogger1.log(message);
                    break;
            }
        }
        if (null != pluginLogger1) {
            switch (level) {
                case Logger.FATAL:
                case Logger.ERROR:
                    pluginLogger1.log(0, message);
                    break;
                case Logger.WARN:
                    pluginLogger1.log(1, message);
                    break;
                case Logger.DEBUG:
                    pluginLogger1.log(5, message);
                    break;
                case Logger.INFO:
                default:
                    pluginLogger1.log(5, message);
                    break;
            }
        }
    }
View Full Code Here

Examples of hudson.plugins.analysis.util.PluginLogger

        if (!acceptGoal(mojo.getGoal())) {
            return true;
        }

        Result currentResult = getCurrentResult(build);
        PluginLogger logger = new LoggerFactory(receiveSettingsFromMaster(build)).createLogger(listener.getLogger(), pluginName);

        if (!canContinue(currentResult)) {
            logger.log("Skipping reporter since build result is " + currentResult);
            return true;
        }

        if (hasResultAction(build)) {
            return true;
        }

        ParserResult result;
        try {
            result = perform(build, pom, mojo, logger);

            if (result.getModules().isEmpty() && result.getNumberOfAnnotations() == 0) {
                logger.log("No report found for mojo " + mojo.getGoal());
                return true;
            }
        }
        catch (InterruptedException exception) {
            logger.log(exception.getMessage());

            return false;
        }
        logger.logLines(result.getLogMessages());

        setEncoding(pom, result, logger);
        registerResultsOnMaster(build, result, logger);
        copyFilesWithAnnotationsToBuildFolder(logger, build.getRootDir(), result.getAnnotations());
View Full Code Here

Examples of hudson.plugins.analysis.util.PluginLogger

    @SuppressWarnings({"serial", "PMD.AvoidFinalLocalVariable"})
    @Override
    public final boolean postExecute(final MavenBuildProxy build, final MavenProject pom, final MojoInfo mojo,
            final BuildListener listener, final Throwable error) throws InterruptedException, IOException {
        PluginLogger logger = new LoggerFactory().createLogger(listener.getLogger(), pluginName);
        if (!acceptGoal(mojo.getGoal())) {
            return true;
        }
        Result currentResult = getCurrentResult(build);
        if (!canContinue(currentResult)) {
            logger.log("Skipping reporter since build result is " + currentResult);
            return true;
        }

        if (hasResultAction(build)) {
            logger.log("Skipping maven reporter: there is already a result available.");
            return true;
        }

        final ParserResult result = perform(build, pom, mojo, logger);

        defaultEncoding = pom.getProperties().getProperty("project.build.sourceEncoding");
        if (defaultEncoding == null) {
            logger.log(Messages.Reporter_Error_NoEncoding(Charset.defaultCharset().displayName()));
            result.addErrorMessage(pom.getName(), Messages.Reporter_Error_NoEncoding(Charset.defaultCharset().displayName()));
        }

        build.execute(new BuildCallable<Void, IOException>() {
            @Override
View Full Code Here

Examples of hudson.plugins.analysis.util.PluginLogger

    }

    @Override
    public final boolean perform(final AbstractBuild<?, ?> build, final Launcher launcher,
            final BuildListener listener) throws InterruptedException, IOException {
        PluginLogger logger = new LoggerFactory().createLogger(listener.getLogger(), pluginName);
        if (canContinue(build.getResult())) {
            return perform(build, launcher, logger);
        }
        else {
            logger.log("Skipping publisher since build result is " + build.getResult());
            return true;
        }
    }
View Full Code Here

Examples of org.bukkit.plugin.PluginLogger

        this.file = file;
        this.description = description;
        this.dataFolder = dataFolder;
        this.classLoader = classLoader;
        this.configFile = new File(dataFolder, "config.yml");
        this.logger = new PluginLogger(this);

        if (description.isDatabaseEnabled()) {
            ServerConfig db = new ServerConfig();

            db.setDefaultServer(false);
View Full Code Here

Examples of org.bukkit.plugin.PluginLogger

        gen.runScript(true, gen.generateDropDdl());
    }

    public Logger getLogger() {
        if (logger == null) {
            logger = new PluginLogger(this);
        }
        return logger;
    }
View Full Code Here

Examples of org.bukkit.plugin.PluginLogger

    }

    @Override
    public Logger getLogger() {
        if (logger == null) {
            logger = new PluginLogger(this);
        }
        return logger;
    }
View Full Code Here

Examples of org.dyno.visual.swing.base.PluginLogger

   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
   */
  public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    logger = new PluginLogger(this);
  }
View Full Code Here

Examples of org.dyno.visual.swing.base.PluginLogger

   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
   */
  public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    logger = new PluginLogger(this);
  }
View Full Code Here

Examples of org.dyno.visual.swing.base.PluginLogger

   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
   */
  public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    logger = new PluginLogger(this);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.