public class LogComponent extends UriEndpointComponent
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
LogComponent() |
Modifier and Type | Method and Description |
---|---|
protected Endpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> parameters)
A factory method allowing derived components to create a new endpoint
from the given URI, remaining path and optional parameters
|
ExchangeFormatter |
getExchangeFormatter() |
protected org.slf4j.Logger |
getLogger(Map<String,Object> parameters)
Gets optional
Logger instance from parameters. |
protected LoggingLevel |
getLoggingLevel(Map<String,Object> parameters)
Gets the logging level, will default to use INFO if no level parameter provided.
|
void |
setExchangeFormatter(ExchangeFormatter exchangeFormatter)
Sets a custom
ExchangeFormatter to convert the Exchange to a String suitable for logging. |
createComponentConfiguration, createParameterConfigurationMap, getEndpointClass, getParameterConfigurationMap, populateParameterConfigurationMap, setEndpointClass
afterConfiguration, createConfiguration, createEndpoint, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, ifStartsWithReturnRemainder, preProcessUri, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
public LogComponent()
protected Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
DefaultComponent
createEndpoint
in class DefaultComponent
uri
- the full URI of the endpointremaining
- the remaining part of the URI without the query
parameters or component prefixparameters
- the optional parameters passed inException
- is thrown if error creating the endpointprotected LoggingLevel getLoggingLevel(Map<String,Object> parameters)
protected org.slf4j.Logger getLogger(Map<String,Object> parameters)
Logger
instance from parameters. If non-null, the provided instance will be used as
Logger
in CamelLogger
parameters
- public ExchangeFormatter getExchangeFormatter()
public void setExchangeFormatter(ExchangeFormatter exchangeFormatter)
ExchangeFormatter
to convert the Exchange to a String suitable for logging.
If not specified, we default to DefaultExchangeFormatter
.Apache Camel