...
Where loggingCategory is the name of the logging category to use. You can append query options to the URI in the following format, ?option=value&option=value&...
Info | ||
---|---|---|
| ||
As of Camel 2.12.4/2.13.1, if there's single instance of |
For example, a log endpoint typically specifies the logging level using the level
option, as follows:
...
Wiki Markup |
---|
{div:class=confluenceTableSmall} || Option || Default || Type || Description || | {{level}} | {{INFO}} | {{String}} | Logging level to use. Possible values: {{ERROR}}, {{WARN}}, {{INFO}}, {{DEBUG}}, {{TRACE}}, {{OFF}} | | {{marker}} | {{null}} | {{String}} | *Camel 2.9:* An optional [Marker|http://www.slf4j.org/api/org/slf4j/Marker.html] name to use. | | {{groupSize}} | {{null}} | {{Integer}} | An integer that specifies a group size for throughput logging.| | {{groupInterval}} | {{null}} | {{Integer}} | If specified will group message stats by this time interval (in millis) | | {{groupDelay}} | {{0}} | {{Integer}} | Set the initial delay for stats (in millis) | | {{groupActiveOnly}} | {{true}} | {{boolean}} | If true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic | | {{logger}} | | {{Logger}} | *Camel 2.12.4/2.13.1:* An optional reference to [org.slf4j.Logger|http://www.slf4j.org/api/org/slf4j/Logger.html] from Registry to use. | {div} |
note: groupDelay and groupActiveOnly are only applicable when using groupInterval
...
Code Block |
---|
<to uri="log:foo?param1=foo&param2=100"/> ... <to uri="log:bar?param1=bar&param2=200"/> |
Using Log component in OSGi
Improvement as of Camel 2.12.4/2.13.1
When using Log component inside OSGi (e.g., in Karaf), the underlying logging mechanisms are provided by PAX logging. It searches for a bundle which invokes org.slf4j.LoggerFactory.getLogger()
method and associates the bundle with the logger instance. Without specifying custom org.sfl4j.Logger
instance, the logger created by Log component is associated with camel-core
bundle.
In some scenarios it is required that the bundle associated with logger should be the bundle which contains route definition. To do this, either register single instance of org.slf4j.Logger
in the Registry or reference it using logger
URI parameter.
Include Page | ||||
---|---|---|---|---|
|
...