开发者

Overriding Camel & log4j

I'm fairly new to Apache Camel, but have to say that I love it so far. One "limitation" (probably a lack of understanding on my part) I've hit so far is that Camel ships with log4j as its default logging component.

My team has already gone to great lengths to build our own logging framework, which ends up posting all log messages to an ActiveMQ queue, and ultimately, our database.

I'd like to configure Camel to work with our logging framework, since so much has already been invested in getting it working. Although Camel doesn't seem to provide any documentation on this, I do have two ideas and wanted to run them by the SO community.

(1) Find a way to re-configure log4j's LoggerFactory. That way we can have our own LoggerFactory return instances of our homegrown Loggers.

(2) Write our own log4j appender, which would use our homegrown Logger.

Has anyone ever had experience with th开发者_Python百科is? Is there an easier/better/more elegant solution out there? Any input is appreciated.


Log4J already provides a JMSAppender. You could be able to just configure one and go. Check out http://activemq.apache.org/how-do-i-use-log4j-jms-appender-with-activemq.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜