Example usage for java.util.logging Level CONFIG

List of usage examples for java.util.logging Level CONFIG

Introduction

In this page you can find the example usage for java.util.logging Level CONFIG.

Prototype

Level CONFIG

To view the source code for java.util.logging Level CONFIG.

Click Source Link

Document

CONFIG is a message level for static configuration messages.

Usage

From source file:com.elasticbox.jenkins.k8s.repositories.api.PodRepositoryApiImpl.java

@Override
public void create(String kubeName, String namespace, Pod pod) throws RepositoryException {
    if (LOGGER.isLoggable(Level.CONFIG)) {
        LOGGER.config("Creating Pod: " + pod.getMetadata().getName());
    }//from w  w w  .  java 2s  .co  m
    kubeRepository.getClient(kubeName).pods().inNamespace(namespace).create(pod);
}

From source file:org.nuxeo.ecm.platform.reporting.engine.BirtEngine.java

public static synchronized IReportEngine getBirtEngine() {
    if (birtEngine == null) {
        EngineConfig config = new EngineConfig();
        if (configProps != null) {
            String logLevel = configProps.getProperty("logLevel");
            Level level = Level.OFF;
            if ("SEVERE".equalsIgnoreCase(logLevel)) {
                level = Level.SEVERE;
            } else if ("WARNING".equalsIgnoreCase(logLevel)) {
                level = Level.WARNING;
            } else if ("INFO".equalsIgnoreCase(logLevel)) {
                level = Level.INFO;
            } else if ("CONFIG".equalsIgnoreCase(logLevel)) {
                level = Level.CONFIG;
            } else if ("FINE".equalsIgnoreCase(logLevel)) {
                level = Level.FINE;
            } else if ("FINER".equalsIgnoreCase(logLevel)) {
                level = Level.FINER;
            } else if ("FINEST".equalsIgnoreCase(logLevel)) {
                level = Level.FINEST;
            } else if ("OFF".equalsIgnoreCase(logLevel)) {
                level = Level.OFF;
            }// w ww.j av a2  s .c o  m

            config.setLogConfig(configProps.getProperty("logDirectory"), level);
        }

        config.setEngineHome("");

        try {
            Platform.startup(config);
        } catch (BirtException e) {
            log.error("Cannot startup birt", e);
        }

        IReportEngineFactory factory = (IReportEngineFactory) Platform
                .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
        birtEngine = factory.createReportEngine(config);

        DesignConfig dconfig = new DesignConfig();
        IDesignEngineFactory df = (IDesignEngineFactory) Platform
                .createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_ENGINE_FACTORY);
        birtDesignEngine = df.createDesignEngine(dconfig);
    }
    return birtEngine;
}

From source file:com.microsoft.windowsazure.core.tracing.util.JavaTracingInterceptor.java

/**
 * Probe configuration for the value of a setting.
 * //from  w ww. j av a 2s .  co m
 * @param source
 *            The configuration source.
 * @param name
 *            The name of the setting.
 * @param value
 *            The value of the setting in the source.
 */
public void configuration(String source, String name, String value) {
    logger.log(Level.CONFIG, String.format("Configuration: source=%s, name=%s, value=%s", source, name, value));
}

From source file:org.geotools.util.logging.CommonsLogger.java

/**
 * Returns the level for this logger.//from www .  jav a  2 s  .c o m
 */
public Level getLevel() {
    if (logger.isTraceEnabled())
        return Level.FINEST;
    if (logger.isDebugEnabled())
        return Level.FINE;
    if (logger.isInfoEnabled())
        return Level.CONFIG;
    if (logger.isWarnEnabled())
        return Level.WARNING;
    if (logger.isErrorEnabled())
        return Level.SEVERE;
    if (logger.isFatalEnabled())
        return Level.SEVERE;
    return Level.OFF;
}

From source file:at.rocworks.oa4j.logger.logger.DataSink.java

private void createGroups() {
    // Logging Groups
    JDebug.out.info("logging groups...");
    int gcount;//  w  w w  .jav  a 2s.  c o  m
    String gprimary = settings.getStringProperty("logger", "primary", "");
    String sgroups = settings.getStringProperty("logger", "groups", "");
    try {
        JSONArray jgroups = (JSONArray) JSONValue.parse(sgroups);
        gcount = jgroups.size();
        for (int j = 0; j < gcount; j++) {
            if (createGroup(settings, jgroups.get(j).toString())) {
                if (gprimary.isEmpty()) {
                    gprimary = jgroups.get(j).toString();
                }
            }
        }
        JDebug.out.log(Level.CONFIG, "primary={0}", gprimary);
        logger.setReadGroup(gprimary);
    } catch (java.lang.ClassCastException ex) {
        JDebug.out.log(Level.SEVERE, "not a valid json group string '{0} [{1}]'!",
                new Object[] { sgroups, ex.toString() });
    }
}

From source file:name.richardson.james.bukkit.utilities.permissions.BukkitPermissionManager.java

public Permission addPermission(final Permission permission) {
    logger.log(Level.CONFIG, "Adding permission: {0}", permission.getName());
    pluginManager.addPermission(permission);
    this.permissions.add(permission);
    return permission;
}

From source file:at.rocworks.oa4j.logger.dbs.NoSQLMongoDB.java

public static NoSQLServer createServer(NoSQLSettings srvcfg, String srvprefix) {
    String url = srvcfg.getStringProperty(srvprefix, "url", "mongodb://localhost/");
    String db = srvcfg.getStringProperty(srvprefix, "db", "pvss");
    boolean docs = srvcfg.getBoolProperty(srvprefix, "documents", false);
    JDebug.out.log(Level.CONFIG, "{0}.type: {1} \n{2}\nurl: {3}\ndb: {4}\ndocuments: {5}",
            new Object[] { srvprefix, NoSQLMongoDB.class.getName(), srvcfg, url, db, docs });
    return new NoSQLMongoDB(srvcfg, url, db, docs);
}

From source file:org.geotoolkit.util.logging.CommonsLogger.java

/**
 * Returns the level for this logger./*from   ww w  .  j  av a 2  s .  c  o  m*/
 */
@Override
public Level getLevel() {
    if (logger.isTraceEnabled())
        return Level.FINEST;
    if (logger.isDebugEnabled())
        return Level.FINE;
    if (logger.isInfoEnabled())
        return Level.CONFIG;
    if (logger.isWarnEnabled())
        return Level.WARNING;
    if (logger.isErrorEnabled())
        return Level.SEVERE;
    if (logger.isFatalEnabled())
        return Level.SEVERE;
    return Level.OFF;
}

From source file:com.elasticbox.jenkins.k8s.repositories.api.PodRepositoryApiImpl.java

@Override
public void delete(String kubeName, String namespace, Pod pod) throws RepositoryException {
    if (LOGGER.isLoggable(Level.CONFIG)) {
        LOGGER.config("Deleting Pod: " + pod.getMetadata().getName());
    }/*from w w w.j  a  v  a 2  s .  c o  m*/
    kubeRepository.getClient(kubeName).pods().inNamespace(namespace).delete(pod);
}

From source file:ductive.log.JDKToCommonsHandler.java

@Override
public void publish(LogRecord record) {
    String name = record.getLoggerName();

    Log log = logs.get(name);//w  w w .  ja  v a2 s .c o m
    if (log == null)
        logs.put(name, log = LogFactory.getLog(name));

    String message = record.getMessage();
    Throwable ex = record.getThrown();
    Level level = record.getLevel();

    if (Level.SEVERE == level)
        log.error(message, ex);
    else if (Level.WARNING == level)
        log.warn(message, ex);
    else if (Level.INFO == level)
        log.info(message, ex);
    else if (Level.CONFIG == level)
        log.debug(message, ex);
    else
        log.trace(message, ex);
}