Package org.apache.camel.component.log
Class LogEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.support.ScheduledPollEndpoint
org.apache.camel.support.DefaultPollingEndpoint
org.apache.camel.support.ProcessorEndpoint
org.apache.camel.component.log.LogEndpoint
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.LineNumberAware,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="1.1.0",
scheme="log",
title="Log Data",
remote=false,
syntax="log:loggerName",
producerOnly=true,
category={CORE,MONITORING})
public class LogEndpoint
extends org.apache.camel.support.ProcessorEndpoint
implements org.apache.camel.LineNumberAware
Prints data form the routed message (such as body and headers) to the logger.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionLogEndpoint(String endpointUri, org.apache.camel.Component component) LogEndpoint(String endpointUri, org.apache.camel.Component component, org.apache.camel.Processor logger) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected org.apache.camel.ProcessorCreates the loggerProcessorto be used.org.apache.camel.Producerprotected voiddoInit()protected voiddoStart()protected voiddoStop()org.apache.camel.spi.ExchangeFormatterSet the initial delay for stats (in millis)If specified will group message stats by this time interval (in millis)An integer that specifies a group size for throughput logging.getLevel()Logging level to use.intorg.apache.camel.ProcessorThe logger name to useAn optional Marker name to use.intorg.slf4j.Loggerorg.apache.camel.support.processor.DefaultExchangeFormatter.OutputStylegetStyle()booleanIf true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic.booleanbooleanisPlain()booleanisRemote()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetExchangeFormatter(org.apache.camel.spi.ExchangeFormatter exchangeFormatter) To use a custom exchange formattervoidsetGroupActiveOnly(boolean groupActiveOnly) If true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic.voidsetGroupDelay(Long groupDelay) Set the initial delay for stats (in millis)voidsetGroupInterval(Long groupInterval) If specified will group message stats by this time interval (in millis)voidsetGroupSize(Integer groupSize) An integer that specifies a group size for throughput logging.voidLogging level to use.voidsetLineNumber(int lineNumber) voidsetLocation(String location) voidsetLogger(org.apache.camel.Processor logger) voidsetLoggerName(String loggerName) The logger name to usevoidsetLogMask(Boolean logMask) If true, mask sensitive information like password or passphrase in the log.voidAn optional Marker name to use.voidsetMaxChars(int maxChars) voidsetMultiline(boolean multiline) voidsetPlain(boolean plain) voidsetProvidedLogger(org.slf4j.Logger providedLogger) voidsetShowAll(boolean showAll) voidsetShowAllProperties(boolean showAllProperties) voidsetShowBody(boolean showBody) voidsetShowBodyType(boolean showBodyType) voidsetShowCachedStreams(boolean showCachedStreams) voidsetShowCaughtException(boolean showCaughtException) voidsetShowException(boolean showException) voidsetShowExchangeId(boolean showExchangeId) voidsetShowExchangePattern(boolean showExchangePattern) voidsetShowFiles(boolean showFiles) voidsetShowFuture(boolean showFuture) voidsetShowHeaders(boolean showHeaders) voidsetShowProperties(boolean showProperties) voidsetShowRouteGroup(boolean showRouteGroup) voidsetShowRouteId(boolean showRouteId) voidsetShowStackTrace(boolean showStackTrace) voidsetShowStreams(boolean showStreams) voidsetShowVariables(boolean showVariables) voidsetSkipBodyLineSeparator(boolean skipBodyLineSeparator) voidsetSourceLocationLoggerName(boolean sourceLocationLoggerName) voidsetStyle(org.apache.camel.support.processor.DefaultExchangeFormatter.OutputStyle style) Methods inherited from class org.apache.camel.support.ProcessorEndpoint
createPollingConsumer, createProcessor, getProcessor, onExchange, setProcessorMethods inherited from class org.apache.camel.support.DefaultPollingEndpoint
createConsumerMethods inherited from class org.apache.camel.support.ScheduledPollEndpoint
configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelayMethods inherited from class org.apache.camel.support.DefaultEndpoint
configureExchange, configurePollingConsumer, createAsyncProducer, createExchange, createExchange, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
LogEndpoint
public LogEndpoint() -
LogEndpoint
-
LogEndpoint
public LogEndpoint(String endpointUri, org.apache.camel.Component component, org.apache.camel.Processor logger)
-
-
Method Details
-
isRemote
public boolean isRemote()- Specified by:
isRemotein interfaceorg.apache.camel.Endpoint
-
doInit
- Overrides:
doInitin classorg.apache.camel.support.DefaultEndpoint- Throws:
Exception
-
doStart
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumberin interfaceorg.apache.camel.LineNumberAware
-
setLineNumber
public void setLineNumber(int lineNumber) - Specified by:
setLineNumberin interfaceorg.apache.camel.LineNumberAware
-
getLocation
- Specified by:
getLocationin interfaceorg.apache.camel.LineNumberAware
-
setLocation
- Specified by:
setLocationin interfaceorg.apache.camel.LineNumberAware
-
setLogger
public void setLogger(org.apache.camel.Processor logger) -
getLogger
public org.apache.camel.Processor getLogger() -
createProducer
- Specified by:
createProducerin interfaceorg.apache.camel.Endpoint- Overrides:
createProducerin classorg.apache.camel.support.ProcessorEndpoint- Throws:
Exception
-
createEndpointUri
- Overrides:
createEndpointUriin classorg.apache.camel.support.DefaultEndpoint
-
getComponent
- Specified by:
getComponentin interfaceorg.apache.camel.ComponentAware- Overrides:
getComponentin classorg.apache.camel.support.DefaultEndpoint
-
createLogger
protected org.apache.camel.Processor createLogger()Creates the loggerProcessorto be used. -
getLevel
Logging level to use. The default value is INFO. -
setLevel
Logging level to use. The default value is INFO. -
getMarker
An optional Marker name to use. -
setMarker
An optional Marker name to use. -
getGroupSize
An integer that specifies a group size for throughput logging. -
setGroupSize
An integer that specifies a group size for throughput logging. -
getGroupInterval
If specified will group message stats by this time interval (in millis) -
setGroupInterval
If specified will group message stats by this time interval (in millis) -
isGroupActiveOnly
public boolean isGroupActiveOnly()If true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic. -
setGroupActiveOnly
public void setGroupActiveOnly(boolean groupActiveOnly) If true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic. -
getGroupDelay
Set the initial delay for stats (in millis) -
setGroupDelay
Set the initial delay for stats (in millis) -
getProvidedLogger
public org.slf4j.Logger getProvidedLogger() -
setProvidedLogger
public void setProvidedLogger(org.slf4j.Logger providedLogger) -
getLoggerName
The logger name to use -
setLoggerName
The logger name to use -
getLogMask
-
setLogMask
If true, mask sensitive information like password or passphrase in the log. -
getExchangeFormatter
public org.apache.camel.spi.ExchangeFormatter getExchangeFormatter() -
setExchangeFormatter
public void setExchangeFormatter(org.apache.camel.spi.ExchangeFormatter exchangeFormatter) To use a custom exchange formatter -
isShowRouteId
public boolean isShowRouteId() -
setShowRouteId
public void setShowRouteId(boolean showRouteId) -
isShowRouteGroup
public boolean isShowRouteGroup() -
setShowRouteGroup
public void setShowRouteGroup(boolean showRouteGroup) -
isShowExchangeId
public boolean isShowExchangeId() -
setShowExchangeId
public void setShowExchangeId(boolean showExchangeId) -
isShowExchangePattern
public boolean isShowExchangePattern() -
setShowExchangePattern
public void setShowExchangePattern(boolean showExchangePattern) -
isShowProperties
public boolean isShowProperties() -
setShowProperties
public void setShowProperties(boolean showProperties) -
isShowAllProperties
public boolean isShowAllProperties() -
setShowAllProperties
public void setShowAllProperties(boolean showAllProperties) -
isShowVariables
public boolean isShowVariables() -
setShowVariables
public void setShowVariables(boolean showVariables) -
isShowHeaders
public boolean isShowHeaders() -
setShowHeaders
public void setShowHeaders(boolean showHeaders) -
isSkipBodyLineSeparator
public boolean isSkipBodyLineSeparator() -
setSkipBodyLineSeparator
public void setSkipBodyLineSeparator(boolean skipBodyLineSeparator) -
isShowBody
public boolean isShowBody() -
setShowBody
public void setShowBody(boolean showBody) -
isShowBodyType
public boolean isShowBodyType() -
setShowBodyType
public void setShowBodyType(boolean showBodyType) -
isShowException
public boolean isShowException() -
setShowException
public void setShowException(boolean showException) -
isShowCaughtException
public boolean isShowCaughtException() -
setShowCaughtException
public void setShowCaughtException(boolean showCaughtException) -
isShowStackTrace
public boolean isShowStackTrace() -
setShowStackTrace
public void setShowStackTrace(boolean showStackTrace) -
isShowAll
public boolean isShowAll() -
setShowAll
public void setShowAll(boolean showAll) -
isMultiline
public boolean isMultiline() -
setMultiline
public void setMultiline(boolean multiline) -
isShowFuture
public boolean isShowFuture() -
setShowFuture
public void setShowFuture(boolean showFuture) -
isShowCachedStreams
public boolean isShowCachedStreams() -
setShowCachedStreams
public void setShowCachedStreams(boolean showCachedStreams) -
isShowStreams
public boolean isShowStreams() -
setShowStreams
public void setShowStreams(boolean showStreams) -
isShowFiles
public boolean isShowFiles() -
setShowFiles
public void setShowFiles(boolean showFiles) -
getMaxChars
public int getMaxChars() -
setMaxChars
public void setMaxChars(int maxChars) -
getStyle
public org.apache.camel.support.processor.DefaultExchangeFormatter.OutputStyle getStyle() -
setStyle
public void setStyle(org.apache.camel.support.processor.DefaultExchangeFormatter.OutputStyle style) -
isPlain
public boolean isPlain() -
setPlain
public void setPlain(boolean plain) -
isSourceLocationLoggerName
public boolean isSourceLocationLoggerName() -
setSourceLocationLoggerName
public void setSourceLocationLoggerName(boolean sourceLocationLoggerName)
-