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:net.community.chest.gitcloud.facade.AbstractEnvironmentInitializer.java

@Override
public void contextDestroyed(ServletContextEvent sce) {
    Log curLogger = logger;/*w  w w  .  j  av a2  s .c o  m*/
    try {
        ServletContext context = sce.getServletContext();
        logger = ServletUtils.wrapServletContext(context, Level.CONFIG);
        contextDestroyed(context);
        logger.info("contextDestroyed(" + context.getContextPath() + ")");
    } catch (Throwable t) {
        logger.error("Failed (" + t.getClass().getSimpleName() + ") to destroy: " + t.getMessage(), t);
        throw ExtendedExceptionUtils.toRuntimeException(t, true);
    } finally {
        logger = curLogger;
    }
}

From source file:name.richardson.james.bukkit.utilities.persistence.configuration.AbstractConfiguration.java

protected final void load() throws IOException {
    logger.log(Level.CONFIG, "Loading configuration: " + this.getClass().getSimpleName());
    logger.log(Level.CONFIG, "Using path: " + this.file.getAbsolutePath());
    if (!this.file.exists() || this.file.length() == 0) {
        this.defaults.options().copyHeader(true);
        this.defaults.options().copyDefaults(true);
        logger.log(Level.WARNING, localisation.getMessage("saving-default-configuration", this.file.getName()));
        defaults.save(this.file);
    }// w w w.ja  va 2  s  .  co m
    this.configuration = YamlConfiguration.loadConfiguration(this.file);
    if (runtimeDefaults)
        this.configuration.setDefaults(this.defaults);
    this.configuration.options().copyDefaults(false);
}

From source file:com.gisgraphy.domain.geoloc.service.fulltextsearch.SolrClientTest.java

@Test
public void testSetSolRLogLevel() throws Exception {
    IsolrClient client = new SolrClient(AbstractIntegrationHttpSolrTestCase.fulltextSearchUrlBinded,
            new MultiThreadedHttpConnectionManager());
    assertTrue(client.isServerAlive());/*from  w  ww.  jav a  2  s  .  com*/
    client.setSolRLogLevel(Level.CONFIG);
    client.setSolRLogLevel(Level.FINE);
    client.setSolRLogLevel(Level.FINER);
    client.setSolRLogLevel(Level.FINEST);
    client.setSolRLogLevel(Level.INFO);
    client.setSolRLogLevel(Level.SEVERE);
    client.setSolRLogLevel(Level.WARNING);
    client.setSolRLogLevel(Level.ALL);
    client.setSolRLogLevel(Level.OFF);
}

From source file:org.openconcerto.sql.model.SQLBase.java

static public final void logCacheError(final DBItemFileCache dir, Exception e) {
    final Logger logger = Log.get();
    if (logger.isLoggable(Level.CONFIG))
        logger.log(Level.CONFIG, "invalid files in " + dir, e);
    else//from   ww w  .  jav  a2  s.com
        logger.info("invalid files in " + dir + "\n" + e.getMessage());
}

From source file:pcgen.system.Main.java

private static void logSystemProps() {
    Properties props = System.getProperties();
    StringWriter writer = new StringWriter();
    PrintWriter pwriter = new PrintWriter(writer);
    pwriter.println();/*from ww  w.j  a v  a 2 s  . co m*/
    pwriter.println("-- listing properties --"); //$NON-NLS-1$
    // Manually output the property values to avoid them being cut off at 40 characters
    Set<String> keys = props.stringPropertyNames();
    //$NON-NLS-1$
    keys.forEach(key -> {
        pwriter.println(key + '=' + props.getProperty(key));
    });
    Logging.log(Level.CONFIG, writer.toString());
}

From source file:jenkins.security.stapler.StaticRoutingDecisionProvider.java

/**
 * @see Function#getSignature()// w w w  . jav  a  2 s  .  c o m
 * @see FieldRef#getSignature()
 */
@Nonnull
public synchronized Decision decide(@Nonnull String signature) {
    if (whitelistSignaturesFromFixedList == null || whitelistSignaturesFromUserControlledList == null
            || blacklistSignaturesFromFixedList == null || blacklistSignaturesFromUserControlledList == null) {
        reload();
    }

    LOGGER.log(Level.CONFIG, "Checking whitelist for " + signature);

    // priority to blacklist
    if (blacklistSignaturesFromFixedList.contains(signature)
            || blacklistSignaturesFromUserControlledList.contains(signature)) {
        return Decision.REJECTED;
    }

    if (whitelistSignaturesFromFixedList.contains(signature)
            || whitelistSignaturesFromUserControlledList.contains(signature)) {
        return Decision.ACCEPTED;
    }

    return Decision.UNKNOWN;
}

From source file:com.github.luluvise.droid_utils.http.HttpConnectionManager.java

private HttpConnectionManager() {
    final Level logLevel = DroidConfig.DEBUG ? Level.CONFIG : Level.OFF;
    Logger.getLogger(HttpTransport.class.getName()).setLevel(logLevel);
}

From source file:org.mili.core.logging.java.JavaAdapter.java

boolean isInfo() {
    Level level = logger.getLevel();
    return isOn() && (isAll() || Level.INFO.intValue() >= level.intValue()
            || Level.CONFIG.intValue() >= level.intValue());
}

From source file:org.openspaces.security.ldap.ActiveDirectorySpringSecurityManager.java

/**
 * Initialize the security manager using the spring security configuration.
 */// ww w  .  j av  a 2  s .c  o m
public void init(Properties properties) throws SecurityException {
    String configLocation = properties.getProperty(SPRING_SECURITY_CONFIG_LOCATION, "security-config.xml");
    if (logger.isLoggable(Level.CONFIG)) {
        logger.config("spring-security-config-location: " + configLocation + ", absolute path: "
                + new File(configLocation).getAbsolutePath());
    }

    /*
     * Extract Spring AuthenticationManager definition
     */
    applicationContext = new FileSystemXmlApplicationContext(configLocation);
    Map<String, AuthenticationManager> beansOfType = applicationContext
            .getBeansOfType(AuthenticationManager.class);
    if (beansOfType.isEmpty()) {
        throw new SecurityException("No bean of type '" + AuthenticationManager.class.getName()
                + "' is defined in " + configLocation);
    }
    if (beansOfType.size() > 1) {
        throw new SecurityException("More than one bean of type '" + AuthenticationManager.class.getName()
                + "' is defined in " + configLocation);
    }
    authenticationManager = beansOfType.values().iterator().next();

    /*
     * Extract Group mapper implementation
     */
    groupMapper = (ActiveDirectoryGroupMapper) applicationContext.getBean(ActiveDirectoryGroupMapper.class);
    if (groupMapper == null) {
        throw new SecurityException("No bean for active directory group mapper defined");
    }

}

From source file:name.richardson.james.bukkit.utilities.persistence.configuration.AbstractConfiguration.java

protected final void save() throws IOException {
    logger.log(Level.CONFIG, "Saving configuration: " + this.file.getName());
    this.configuration.save(this.file);
}