Package org.apache.camel.processor

Examples of org.apache.camel.processor.CamelLogger


    public boolean supportTransacted() {
        return false;
    }

    public Processor createErrorHandler(final RouteContext routeContext, final Processor processor) {
        CamelLogger logger = new CamelLogger(log, level);

        LoggingErrorHandler handler = new LoggingErrorHandler(routeContext.getCamelContext(), processor, logger, getExceptionPolicyStrategy());
        configure(handler);
        return handler;
    }
View Full Code Here


    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
        LoggingLevel level = getLoggingLevel(parameters);
        Integer groupSize = getAndRemoveParameter(parameters, "groupSize", Integer.class);
        Long groupInterval = getAndRemoveParameter(parameters, "groupInterval", Long.class);

        CamelLogger logger;
        if (groupSize != null) {
            logger = new ThroughputLogger(remaining, level, groupSize);
        } else if (groupInterval != null) {
            Boolean groupActiveOnly = getAndRemoveParameter(parameters, "groupActiveOnly", Boolean.class, Boolean.TRUE);
            Long groupDelay = getAndRemoveParameter(parameters, "groupDelay", Long.class);
            logger = new ThroughputLogger(this.getCamelContext(), remaining, level, groupInterval, groupDelay, groupActiveOnly);
        } else {
            LogFormatter formatter = new LogFormatter();
            IntrospectionSupport.setProperties(formatter, parameters);

            logger = new CamelLogger(remaining);
            logger.setLevel(level);
            logger.setFormatter(formatter);
        }

        LogEndpoint endpoint = new LogEndpoint(uri, this);
        setProperties(endpoint, parameters);
        return new LogEndpoint(uri, this, logger);
View Full Code Here

    protected RedeliveryPolicy createRedeliveryPolicy() {
        return new RedeliveryPolicy();
    }

    protected CamelLogger createLogger() {
        return new CamelLogger(LoggerFactory.getLogger(DeadLetterChannel.class), LoggingLevel.ERROR);
    }
View Full Code Here

*/
public class LoggingExceptionHandler implements ExceptionHandler {
    private final CamelLogger logger;

    public LoggingExceptionHandler(Class<?> ownerType) {
        this(new CamelLogger(LoggerFactory.getLogger(ownerType), LoggingLevel.DEBUG));
    }
View Full Code Here

    }

    @Test
    public void testListenerContainerUsesSpringConnectionFactory() throws Exception {
        JmsEndpoint endpoint = resolveMandatoryEndpoint("activemq:topic:test.foo");
        JmsConsumer consumer = endpoint.createConsumer(new CamelLogger());

        AbstractMessageListenerContainer listenerContainer = consumer.getListenerContainer();
        assertEquals("pubSubDomain", true, listenerContainer.isPubSubDomain());
        assertIsInstanceOf(PooledConnectionFactory.class, listenerContainer.getConnectionFactory());
    }
View Full Code Here

    public void setLoggingLevel(LoggingLevel loggingLevel) {
        this.loggingLevel = loggingLevel;
    }

    protected CamelLogger createLogger() {
        return new CamelLogger(LoggerFactory.getLogger(ThrottlingInflightRoutePolicy.class), getLoggingLevel());
    }
View Full Code Here

    public NettyProducer(NettyEndpoint nettyEndpoint, NettyConfiguration configuration) {
        super(nettyEndpoint);
        this.configuration = configuration;
        this.context = this.getEndpoint().getCamelContext();
        this.noReplyLogger = new CamelLogger(LOG, configuration.getNoReplyLogLevel());
    }
View Full Code Here

        policy.setRedeliveryDelay(0);
        return policy;
    }

    protected CamelLogger createLogger() {
        return new CamelLogger(LoggerFactory.getLogger(DefaultErrorHandler.class), LoggingLevel.ERROR);
    }
View Full Code Here

     * @param formatter the exchange formatter
     * @return the logger to use
     */
    public synchronized CamelLogger getLogger(ExchangeFormatter formatter) {
        if (logger == null) {
            logger = new CamelLogger(LoggerFactory.getLogger(getLogName()), formatter);
            logger.setLevel(getLogLevel());
        }
        return logger;
    }
View Full Code Here

        if (name == null) {
            name = routeContext.getRoute().getId();
        }
        // should be INFO by default
        LoggingLevel level = getLoggingLevel() != null ? getLoggingLevel() : LoggingLevel.INFO;
        CamelLogger logger = new CamelLogger(name, level);

        return new LogProcessor(exp, logger);
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.processor.CamelLogger

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.