IAmYourFaja
IAmYourFaja

Reputation: 56944

Camel Log Component

I'm looking for a logging solution that is based on SLF4J so I can bind to any underlying implementation I want at runtime (for right now I'm thinking log4j). Since I am planning to have my backend routed via Apache Camel, I figured Camel must have some solution for logging.

It does - here.

But from that page description I can't tell if camel-log is for pushing internal (Camel) messages (errors, exceptions, infos, etc.) to SLF4J, or for me to use as a SLF4J "wrapper", or both.

Hence my question: is camel-log for enabling Camel messaging (so I can see what Camel is doing under the hood) or is it a component that pushes my application's messages onto a route? Or both?!?

Thanks in advance!

Upvotes: 3

Views: 2705

Answers (1)

maximdim
maximdim

Reputation: 8169

Camel log component (http://camel.apache.org/log.html) is for logging exchanges. In latest versions of Camel it uses SFL4J so you could choose underlying logging implementation in usual SFL4J way.

You could enable 'trace' on Camel context to 'see what Camel is doing under the roof'.

For your own logging you could just use SLF4J inside your code as usual.

Upvotes: 3

Related Questions