Package org.apache.logging.log4j

Examples of org.apache.logging.log4j.Logger.error()


public class CollectionLoggingTest {

    @Test
    public void testSystemProperties() {
        Logger logger = LogManager.getLogger(CollectionLoggingTest.class.getName());
        logger.error(System.getProperties());
        // logger.error(new MapMessage(System.getProperties()));
    }

    @Test
    public void testSimpleMap() {
View Full Code Here


    }

    @Test
    public void testSimpleMap() {
        Logger logger = LogManager.getLogger(CollectionLoggingTest.class.getName());
        logger.error(System.getProperties());
        Map<String, String> map = new HashMap<String, String>();
        map.put("MyKey1", "MyValue1");
        map.put("MyKey2", "MyValue2");
        logger.error(new MapMessage(map));
        logger.error(map);
View Full Code Here

        Logger logger = LogManager.getLogger(CollectionLoggingTest.class.getName());
        logger.error(System.getProperties());
        Map<String, String> map = new HashMap<String, String>();
        map.put("MyKey1", "MyValue1");
        map.put("MyKey2", "MyValue2");
        logger.error(new MapMessage(map));
        logger.error(map);
    }

    @Test
    public void testNetworkInterfaces() throws SocketException {
View Full Code Here

        logger.error(System.getProperties());
        Map<String, String> map = new HashMap<String, String>();
        map.put("MyKey1", "MyValue1");
        map.put("MyKey2", "MyValue2");
        logger.error(new MapMessage(map));
        logger.error(map);
    }

    @Test
    public void testNetworkInterfaces() throws SocketException {
        Logger logger = LogManager.getLogger(CollectionLoggingTest.class.getName());
View Full Code Here

    }

    @Test
    public void testNetworkInterfaces() throws SocketException {
        Logger logger = LogManager.getLogger(CollectionLoggingTest.class.getName());
        logger.error(NetworkInterface.getNetworkInterfaces());
    }

    @Test
    public void testAvailableCharsets() throws SocketException {
        Logger logger = LogManager.getLogger(CollectionLoggingTest.class.getName());
View Full Code Here

    }

    @Test
    public void testAvailableCharsets() throws SocketException {
        Logger logger = LogManager.getLogger(CollectionLoggingTest.class.getName());
        logger.error(Charset.availableCharsets());
    }

}
View Full Code Here

        final long millis = System.currentTimeMillis();

        final Logger logger = LogManager.getLogger(this.getClass().getName() + ".testFactoryMethodConfig");
        logger.debug("Factory logged message 01.");
        logger.error("Error from factory 02.", exception);

        final Statement statement = this.connection.createStatement();
        final ResultSet resultSet = statement.executeQuery("SELECT * FROM fmLogEntry ORDER BY id");

        assertTrue("There should be at least one row.", resultSet.next());
View Full Code Here

    @Test
    public void test1() {
        Logger logger = LogManager.getLogger(BasicLoggingTest.class.getName());
        logger.debug("debug not set");
        logger.error("Test message");
    }
}
View Full Code Here

            //System.err.println("Initializing logger");
            final Logger logger = LogManager.getLogger(SocketReconnectTest.class);

            String message = "Log #1";
            logger.error(message);

            BufferedReader reader = new BufferedReader(new InputStreamReader(futureIn.get()));
            assertEquals(message, reader.readLine());

            closeQuietly(testServer);
View Full Code Here

            assertEquals(message, reader.readLine());

            closeQuietly(testServer);

            message = "Log #2";
            logger.error(message);

            message = "Log #3";
            try {
                logger.error(message);
            } catch (final AppenderRuntimeException e) {
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.