Package com.netflix.logging.messaging

Examples of com.netflix.logging.messaging.MessageBatcher


    /**
     * Shuts down blitz4j cleanly by flushing out all the async related
     * messages.
     */
    public void stop() {
        MessageBatcher batcher = null;
        for (String originalAppenderName : originalAsyncAppenderNameMap
                .keySet()) {
            String batcherName = AsyncAppender.class.getName() + "."
            + originalAppenderName;
            batcher = BatcherFactory.getBatcher(batcherName);
            if (batcher == null) {
                continue;
            }
            batcher.stop();
        }
        for (String originalAppenderName : originalAsyncAppenderNameMap
                .keySet()) {
            String batcherName = AsyncAppender.class.getName() + "."
            + originalAppenderName;
View Full Code Here


                + consolidatedProps.getProperty(LOG4J_ROOT_LOGGER));

        // Pause the async appenders so that the appenders are not accessed
        for (String originalAppenderName : originalAsyncAppenderNameMap
                .keySet()) {
            MessageBatcher asyncBatcher = BatcherFactory
            .getBatcher(AsyncAppender.class.getName() + "."
                    + originalAppenderName);
            if (asyncBatcher == null) {
                continue;
            }
            asyncBatcher.pause();
        }

        // Configure log4j using the new set of properties
        configureLog4j(consolidatedProps);
        // Resume all the batchers to continue logging
        for (String originalAppenderName : originalAsyncAppenderNameMap
                .keySet()) {
            MessageBatcher asyncBatcher = BatcherFactory
            .getBatcher(AsyncAppender.class.getName() + "."
                    + originalAppenderName);
            if (asyncBatcher == null) {
                continue;
            }
            asyncBatcher.resume();
        }
    }
View Full Code Here

    private static final String consoleEventsProcessed = "stdout_putInBuffer";

    @After
    public void tearDown() throws Exception {
        props.clear();
        MessageBatcher asyncBatcherConsole = BatcherFactory
                .getBatcher(AsyncAppender.class.getName() + "." + "stdout");
        Assert.assertNull(asyncBatcherConsole);
    }
View Full Code Here

TOP

Related Classes of com.netflix.logging.messaging.MessageBatcher

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.