Package java.util.logging

Examples of java.util.logging.Logger.severe()


        Logger logger = Logger.getLogger(MemorySettingsTest.class.getName());

        logger.severe("maxMemory = " + runtime.maxMemory());

        logger.severe("freeMemory = " + runtime.freeMemory());

        logger.severe("totalMemory = " + runtime.totalMemory());
    }
}
View Full Code Here


        logger.severe("maxMemory = " + runtime.maxMemory());

        logger.severe("freeMemory = " + runtime.freeMemory());

        logger.severe("totalMemory = " + runtime.totalMemory());
    }
}
View Full Code Here

     * Test this logger.
     */
    public static void main(String[] args) {
        Logger logger = setConsoleHandler();
        logger = Logger.getLogger("Test");
        logger.severe("Does this come out?");
        logger.severe("Does this come out?");
        logger.severe("Does this come out?");
        logger.log(Level.SEVERE, "hello", new RuntimeException("test"));
    }
}
View Full Code Here

     */
    public static void main(String[] args) {
        Logger logger = setConsoleHandler();
        logger = Logger.getLogger("Test");
        logger.severe("Does this come out?");
        logger.severe("Does this come out?");
        logger.severe("Does this come out?");
        logger.log(Level.SEVERE, "hello", new RuntimeException("test"));
    }
}
View Full Code Here

    public static void main(String[] args) {
        Logger logger = setConsoleHandler();
        logger = Logger.getLogger("Test");
        logger.severe("Does this come out?");
        logger.severe("Does this come out?");
        logger.severe("Does this come out?");
        logger.log(Level.SEVERE, "hello", new RuntimeException("test"));
    }
}
View Full Code Here

        log.finer("finer_testLogLevelMatches");
        log.fine("fine_testLogLevelMatches");
        log.config("config_testLogLevelMatches");
        log.info("info_testLogLevelMatches");
        log.warning("warning_testLogLevelMatches");
        log.severe("severe_testLogLevelMatches");
        flush(log);

        assertLogContains("finest_testLogLevelMatches", LogService.LogLevel.DEBUG);
        assertLogContains("finer_testLogLevelMatches", LogService.LogLevel.DEBUG);
        assertLogContains("fine_testLogLevelMatches", LogService.LogLevel.DEBUG);
View Full Code Here

                // Bummer, the command had an error. Log and save output
                failureOccurred = true;
                failedServerNames.append(iname).append(" ");
                reportResult.failedServerNames.add(iname);
                msg = iname + ": " + instanceReport.getMessage();
                logger.severe(msg);
                output.append(msg).append(NL);
            } else {
                // Command worked. Note that too.
                succeededServerNames.append(iname).append(" ");
                reportResult.succeededServerNames.add(iname);
View Full Code Here

        for (int i=0; i<namespaces.length; i++) {
            System.out.println();
            System.out.print("Testing ");
            final Logger logger = Logging.getLogger(namespaces[i]);
            System.out.println(logger.getName());
            logger.severe ("Don't worry, just a test");
            logger.warning("This is an imaginary warning");
            logger.info   ("This is a pseudo-information message");
            logger.config ("Not really configuring anything...");
            logger.fine   ("This is a detailed (but useless) message\nWe log this one on two lines!");
            logger.finer  ("This is a debug message");
View Full Code Here

            logger.finer  ("Message to Commons-logging at FINER level.");
            logger.fine   ("Message to Commons-logging at FINE level.");
            logger.config ("Message to Commons-logging at CONFIG level.");
            logger.info   ("Message to Commons-logging at INFO level.");
            logger.warning("Message to Commons-logging at WARNING level.");
            logger.severe ("Message to Commons-logging at SEVERE level.");
            log4j.setLevel(oldLevel);
        } finally {
            Logging.GEOTOOLS.setLoggerFactory((String) null);
            assertEquals(Logger.class, Logging.getLogger("org.geotools").getClass());
        }
View Full Code Here

            logger.finer  ("Message to Log4J at FINER level.");
            logger.fine   ("Message to Log4J at FINE level.");
            logger.config ("Message to Log4J at CONFIG level.");
            logger.info   ("Message to Log4J at INFO level.");
            logger.warning("Message to Log4J at WARNING level.");
            logger.severe ("Message to Log4J at SEVERE level.");
            logger.setLevel(oldLevel);
        } finally {
            Logging.GEOTOOLS.setLoggerFactory((String) null);
            assertEquals(Logger.class, Logging.getLogger("org.geotools").getClass());
        }
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.