Example usage for java.util.logging Level INFO

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

Introduction

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

Prototype

Level INFO

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

Click Source Link

Document

INFO is a message level for informational messages.

Usage

From source file:com.titankingdoms.dev.titanchat.addon.AddonManager.java

public AddonManager() {
    this.plugin = TitanChat.getInstance();

    if (getAddonDirectory().mkdirs())
        plugin.log(Level.INFO, "Creating addon directory...");

    this.addons = new TreeMap<String, ChatAddon>();
}

From source file:namedatabasescraper.NameDatabaseScraper.java

public NameDatabaseScraper() throws Exception {
    NameDatabaseScraper.application = this;

    // First setup our logger
    this.checkSettingsDirExists();
    logger.setLevel(Level.INFO);
    FileHandler fh = new FileHandler(this.settingsDirname + File.separator + "debug.log", 8096, 1, false);
    logger.addHandler(fh);// ww  w  . j a va  2  s .  c om
    SimpleFormatter formatter = new SimpleFormatter();
    fh.setFormatter(formatter);
    logger.info("Starting NameDatabaseScraper");

    // Load our properties and attach the database, creating it if it doesn't exist
    this.loadProperties();
    this.attachDatabase();

    // Create our GUI
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    window = new MainWindow(this);
    window.setLocationRelativeTo(null);
    window.setTitle("NameDatabaseScraper");
    window.setVisible(true);
}

From source file:Jimbo.Cheerlights.BlinktLights.java

/**
 * Update the lights with a new colour.//from www  .jav  a  2 s .  c o m
 * 
 * @param colour The colour to update with
 * @throws IOException In case of problems
 */
@Override
public synchronized void update(int colour) throws IOException {
    LOG.log(Level.INFO, "Update new colour {0}", Integer.toHexString(colour));

    int[] next = new int[data.length];

    for (int i = 1; i < data.length; ++i)
        next[i] = data[i - 1];

    next[0] = colour;

    for (int step = 1; step <= 100; ++step) {
        final int left = 100 - step;

        for (int i = 0; i < data.length; ++i) {
            final int r = (step * ((next[i] >> 16) & 0xff) + left * ((data[i] >> 16) & 0xff)) / 100;
            final int g = (step * ((next[i] >> 8) & 0xff) + left * ((data[i] >> 8) & 0xff)) / 100;
            final int b = (step * ((next[i]) & 0xff) + left * ((data[i]) & 0xff)) / 100;

            blinkt.set(i, r, g, b, 8);
        }

        blinkt.show();

        try {
            Thread.sleep(100);
        }

        catch (InterruptedException e) {
            LOG.log(Level.WARNING, "Interrupted sleep?");
        }
    }

    data = next;
}

From source file:net.sf.mpaxs.spi.server.LocalComputeHostLauncher.java

@Override
public void startComputeHost(Configuration cfg) {
    Logger.getLogger(getClass().getName()).log(Level.INFO,
            "Starting local compute host with configuration: {0}", ConfigurationUtils.toString(cfg));
    StartUp su = new StartUp(cfg);
}

From source file:com.plan.proyecto.servicios.gestionCuentas.GestionCuentasImplTest.java

/**
 * Test of AltaCuenta method, of class GestionCuentasImpl.
 *//*from w  ww.  j  a va2  s.co  m*/
@Test
public void testAltaCuenta() {
    log.log(Level.INFO, "AltaCuenta");
    log.log(Level.INFO, "Prueba de insercin de usuario");

    String password = "abcd";
    String email = "adddd@aaaaa.com";
    String nombre = "cesar";
    Date fecha = new Date();

    Cuenta cuenta = new Cuenta(email, password, nombre, fecha);

    Boolean expResult = true;
    assertNotNull(gestionCuentas.AltaCuenta(cuenta).getId());

    log.log(Level.INFO, "Prueba de insercin de usuario terminada");
    log.log(Level.INFO, "Prueba de insercin de un segundo usuario repetido");

    password = "abcd";
    email = "adddd@aaaaa.com";
    nombre = "cesar";
    fecha = new Date();

    Cuenta cuenta2 = new Cuenta(email, password, nombre, fecha);

    expResult = false;
    assertNull(gestionCuentas.AltaCuenta(cuenta2));

    log.log(Level.INFO, "Prueba de insercin de un segundo usuario repetido, terminada");
}

From source file:br.com.sicoob.cro.cop.batch.configuration.TaskletInjector.java

/**
 * Injeta a dependencia do contexto no takslet.
 *
 * @throws Exception para algum erro./*from ww w .j  ava  2  s  .c o m*/
 */
public void inject() throws Exception {
    Field[] fields = BatchUtil.getDeclaredFields(this.step.getTasklet());
    for (Field field : fields) {
        if (Validation.isFieldAnnotatedWith(field, Context.class)) {
            LOG.log(Level.INFO,
                    BatchPropertiesUtil.getInstance().getMessage(BatchKeys.BATCH_INJECTOR_INFO.getKey(),
                            new String[] { BatchKeys.CONTEXT.getKey(), field.getName() }));
            field.setAccessible(Boolean.TRUE);
            field.set(this.step.getTasklet(), createContext());
        }
    }
}

From source file:com.amazonaws.services.kinesis.application.stocktrades.processor.StockTradesProcessor.java

/**
 * Sets the global log level to WARNING and the log level for this package to INFO,
 * so that we only see INFO messages for this processor. This is just for the purpose
 * of this tutorial, and should not be considered as best practice.
 *
 *///w  w  w.  j a v  a 2s.c  o  m
private static void setLogLevels() {
    ROOT_LOGGER.setLevel(Level.WARNING);
    PROCESSOR_LOGGER.setLevel(Level.INFO);
}

From source file:net.chrissearle.spring.twitter.spring.Twitter4jFollowService.java

@Override
public void follow(String twitterUserId) {
    if (logger.isLoggable(Level.INFO)) {
        logger.info(new StringBuilder().append("Following: ").append(twitterUserId).toString());
    }/*from   w  ww.  j a va 2s .c  om*/

    if (isActive()) {
        addTwitterFriendshipAndNotification(twitterUserId);
    } else {
        if (logger.isLoggable(Level.INFO)) {
            logger.info("Twitter disabled");
        }
    }
}

From source file:com.jwt.exceptions.GlobalExceptionHandler.java

@ExceptionHandler(BindException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)// w w w  . j  ava  2s. c  om
@ResponseBody
public Map handleException(BindException exception) {
    _LOGGER.log(Level.INFO, (Supplier<String>) exception);
    List<String> errors = new ArrayList<>();
    for (FieldError fe : exception.getFieldErrors()) {
        errors.add(fe.getDefaultMessage());
    }
    return error(errors);
}

From source file:com.skcraft.launcher.launch.JavaRuntimeFetcher.java

public File findJRE() {
    File runtime = getRuntimeDir();
    if (runtime == null) {
        log.log(Level.INFO, "Could not detect runtime dir on platform {0}",
                Environment.getInstance().getPlatform());
        return null;
    }/*from   w w  w . j a  v a 2 s  .  c  o m*/

    log.log(Level.INFO, "Detected runtime dir: {0}, exists: {1}", new Object[] { runtime, runtime.exists() });

    File x64 = resolve(runtime, "jre-x64");
    File jre = getLatestJRE(x64);
    if (jre == null || !jre.isDirectory()) {
        installJRE();
    }

    jre = getLatestJRE(x64);
    if (jre == null || !jre.isDirectory()) {
        log.log(Level.WARNING, "Could not locate JRE in: {0}, exists: {1}", new Object[] { x64, x64.exists() });
        return null;
    }

    boolean root = containsAll(jre, "license", "welcome");
    boolean bin = containsAll(new File(jre, "bin"), "java");
    boolean lib = containsAll(new File(jre, "lib"), "rt", "resources", "charsets");
    if (!root || !bin || !lib) {
        log.log(Level.WARNING, "Incomplete JRE installation detected in: {0}", new Object[] { jre });
        installJRE();
        jre = getLatestJRE(x64);
        if (jre == null) {
            log.log(Level.WARNING, "Could not locate JRE in: {0}, exists: {1}",
                    new Object[] { x64, x64.exists() });
            return null;
        }
    }

    log.log(Level.INFO, "Detected JRE: {0}", jre);

    if (!resolve(jre, "bin", "java").setExecutable(true)) {
        log.log(Level.WARNING, "Unable to make 'java' executable!");
    }

    if (!resolve(jre, "bin", "javaw").setExecutable(true)) {
        log.log(Level.WARNING, "Unable to make 'javaw' executable!");
    }

    return resolve(jre, "bin");
}