Package org.apache.logging.log4j.core.appender

Examples of org.apache.logging.log4j.core.appender.ConsoleAppender


        appender.start();
        final CompositeFilter serverFilters = CompositeFilter.createFilters(new Filter[]{serverFilter});
        final ListAppender<LogEvent> listApp = new ListAppender<LogEvent>("Events", serverFilters, null, false, false);
        listApp.start();
        final PatternLayout layout = PatternLayout.createLayout("%m %ex%n", null, null, null);
        final ConsoleAppender console = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false", "true");
        console.start();
        final Logger serverLogger = ctx.getLogger(JMSTopicReceiver.class.getName());
        serverLogger.addAppender(console);
        serverLogger.setAdditive(false);

View Full Code Here


            null, "Test", null, null, null, socketFilter, null, null);
        appender.start();
        final ListAppender<LogEvent> listApp = new ListAppender<LogEvent>("Events", serverFilter, null, false, false);
        listApp.start();
        final PatternLayout layout = PatternLayout.createLayout("%m %ex%n", null, null, null);
        final ConsoleAppender console = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false", "true");
        final Logger serverLogger = ctx.getLogger(SocketServer.class.getName());
        serverLogger.addAppender(console);
        serverLogger.setAdditive(false);

        // set appender on root and set level to debug
View Full Code Here

    @ClassRule
    public static InitialLoggerContext context = new InitialLoggerContext(CONFIG);

    @Test
    public void testHostname() {
        final ConsoleAppender app = (ConsoleAppender) context.getRequiredAppender("console");
        final Layout<?> layout = app.getLayout();
        assertNotNull("No Layout", layout);
        assertTrue("Layout is not a PatternLayout", layout instanceof PatternLayout);
        String pattern = ((PatternLayout) layout).getConversionPattern();
        assertNotNull("No conversion pattern", pattern);
        assertTrue("No filters", pattern.contains("org.junit,org.apache.maven,org.eclipse,sun.reflect,java.lang.reflect"));
View Full Code Here

        final SocketAppender socketAppender = createSocketAppender(socketFilter, socketLayout);
        socketAppender.start();
        final ListAppender listAppender = new ListAppender("Events", serverFilter, null, false, false);
        listAppender.start();
        final PatternLayout layout = PatternLayout.newBuilder().withPattern("%m %ex%n").build();
        final ConsoleAppender console = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false",
                "true");
        final Logger serverLogger = ctx.getLogger(this.getClass().getName());
        serverLogger.addAppender(console);
        serverLogger.setAdditive(false);
View Full Code Here

        appender.start();
        final CompositeFilter serverFilters = CompositeFilter.createFilters(new Filter[]{serverFilter});
        final ListAppender listApp = new ListAppender("Events", serverFilters, null, false, false);
        listApp.start();
        final PatternLayout layout = PatternLayout.createLayout("%m %ex%n", null, null, null);
        final ConsoleAppender console = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false", "true");
        console.start();
        final Logger serverLogger = ctx.getLogger(JMSTopicReceiver.class.getName());
        serverLogger.addAppender(console);
        serverLogger.setAdditive(false);

View Full Code Here

        appender.start();
        final CompositeFilter serverFilters = CompositeFilter.createFilters(new Filter[]{serverFilter});
        final ListAppender listApp = new ListAppender("Events", serverFilters, null, false, false);
        listApp.start();
        final PatternLayout layout = PatternLayout.createLayout("%m %ex%n", null, null, null);
        final ConsoleAppender console = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false", "true");
        console.start();
        final Logger serverLogger = ctx.getLogger(JMSTopicReceiver.class.getName());
        serverLogger.addAppender(console);
        serverLogger.setAdditive(false);

View Full Code Here

            null, "Test", null, null, null, socketFilter, null, null);
        appender.start();
        final ListAppender listApp = new ListAppender("Events", serverFilter, null, false, false);
        listApp.start();
        final PatternLayout layout = PatternLayout.createLayout("%m %ex%n", null, null, null);
        final ConsoleAppender console = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false", "true");
        final Logger serverLogger = ctx.getLogger(SocketServer.class.getName());
        serverLogger.addAppender(console);
        serverLogger.setAdditive(false);

        // set appender on root and set level to debug
View Full Code Here

        appender.start();
        final CompositeFilter serverFilters = CompositeFilter.createFilters(new Filter[]{serverFilter});
        final ListAppender listApp = new ListAppender("Events", serverFilters, null, false, false);
        listApp.start();
        final PatternLayout layout = PatternLayout.createLayout("%m %ex%n", null, null, null, null);
        final ConsoleAppender console = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false", "true");
        console.start();
        final Logger serverLogger = ctx.getLogger(JMSTopicReceiver.class.getName());
        serverLogger.addAppender(console);
        serverLogger.setAdditive(false);

View Full Code Here

        appender.start();
        final CompositeFilter serverFilters = CompositeFilter.createFilters(new Filter[]{serverFilter});
        final ListAppender listApp = new ListAppender("Events", serverFilters, null, false, false);
        listApp.start();
        final PatternLayout layout = PatternLayout.createLayout("%m %ex%n", null, null, null, null);
        final ConsoleAppender console =
                ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false", "true");
        console.start();
        final Logger serverLogger = ctx.getLogger(JMSTopicReceiver.class.getName());
        serverLogger.addAppender(console);
        serverLogger.setAdditive(false);

View Full Code Here

                "false", null, socketFilter, null, null);
        appender.start();
        final ListAppender listApp = new ListAppender("Events", serverFilter, null, false, false);
        listApp.start();
        final PatternLayout layout = PatternLayout.createLayout("%m %ex%n", null, null, null, null);
        final ConsoleAppender console = ConsoleAppender.createAppender(layout, null, "SYSTEM_OUT", "Console", "false", "true");
        final Logger serverLogger = ctx.getLogger(this.getClass().getName());
        serverLogger.addAppender(console);
        serverLogger.setAdditive(false);

        // set appender on root and set level to debug
View Full Code Here

TOP

Related Classes of org.apache.logging.log4j.core.appender.ConsoleAppender

Copyright © 2018 www.massapicom. 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.