@UriEndpoint(firstVersion="1.1.0", scheme="log", title="Log", syntax="log:loggerName", producerOnly=true, label="core,monitoring") public class LogEndpoint extends ProcessorEndpoint
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
LogEndpoint() |
LogEndpoint(String endpointUri,
Component component) |
LogEndpoint(String endpointUri,
Component component,
Processor logger) |
Modifier and Type | Method and Description |
---|---|
protected String |
createEndpointUri()
A factory method to lazily create the endpointUri if none is specified
|
protected Processor |
createLogger()
Creates the logger
Processor to be used. |
Producer |
createProducer()
Creates a new producer which is used send messages into the endpoint
|
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
Boolean |
getGroupActiveOnly()
If true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic.
|
Long |
getGroupDelay()
Set the initial delay for stats (in millis)
|
Long |
getGroupInterval()
If specified will group message stats by this time interval (in millis)
|
Integer |
getGroupSize()
An integer that specifies a group size for throughput logging.
|
String |
getLevel()
Logging level to use.
|
ExchangeFormatter |
getLocalFormatter() |
Processor |
getLogger() |
String |
getLoggerName()
The logger name to use
|
Boolean |
getLogMask() |
String |
getMarker()
An optional Marker name to use.
|
org.slf4j.Logger |
getProvidedLogger() |
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.
|
void |
setGroupDelay(Long groupDelay)
Set the initial delay for stats (in millis)
|
void |
setGroupInterval(Long groupInterval)
If specified will group message stats by this time interval (in millis)
|
void |
setGroupSize(Integer groupSize)
An integer that specifies a group size for throughput logging.
|
void |
setLevel(String level)
Logging level to use.
|
void |
setLocalFormatter(ExchangeFormatter localFormatter) |
void |
setLogger(Processor logger) |
void |
setLoggerName(String loggerName)
The logger name to use
|
void |
setLogMask(Boolean logMask)
If true, mask sensitive information like password or passphrase in the log.
|
void |
setMarker(String marker)
An optional Marker name to use.
|
void |
setProvidedLogger(org.slf4j.Logger providedLogger) |
createPollingConsumer, createProcessor, getProcessor, isSingleton, onExchange, setProcessor
createConsumer
configurePollingConsumer, configureProperties, configureScheduledPollConsumerProperties, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, initConsumerProperties, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
configureConsumer, createEndpointConfiguration, createExchange, createExchange, createExchange, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public LogEndpoint()
public LogEndpoint(String endpointUri, Component component)
public LogEndpoint(String endpointUri, Component component, Processor logger)
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.doStart
in class ScheduledPollEndpoint
Exception
ServiceSupport.doStop()
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.doStop
in class ScheduledPollEndpoint
Exception
ServiceSupport.doStart()
public Producer createProducer() throws Exception
Endpoint
createProducer
in interface Endpoint
createProducer
in class ProcessorEndpoint
Exception
- can be thrownprotected String createEndpointUri()
DefaultEndpoint
createEndpointUri
in class DefaultEndpoint
protected Processor createLogger() throws Exception
Processor
to be used.Exception
public Integer getGroupSize()
public void setGroupSize(Integer groupSize)
public Long getGroupInterval()
public void setGroupInterval(Long groupInterval)
public Boolean getGroupActiveOnly()
public void setGroupActiveOnly(Boolean groupActiveOnly)
public Long getGroupDelay()
public void setGroupDelay(Long groupDelay)
public ExchangeFormatter getLocalFormatter()
public void setLocalFormatter(ExchangeFormatter localFormatter)
public org.slf4j.Logger getProvidedLogger()
public void setProvidedLogger(org.slf4j.Logger providedLogger)
public String getLoggerName()
public void setLoggerName(String loggerName)
public Boolean getLogMask()
public void setLogMask(Boolean logMask)
Apache Camel