Adapting SwiftMQ logging to Log4j
1 posts in topic
Flat View  Flat View

Posted By:   Jason_Dillon
Posted On:   Friday, April 19, 2002 05:48 PM

Is it possible to adapt the SwiftMQ logging mechanism to

If so, how?

I am guessing that it might be possible to extend com.swiftmq.swiftlet.LogSwiftlet have the logXXX() methods simply invoke the equivilent method on a category... but that is only a guess.

Am I on the right trail? If not can you give me a hint on which direction I should go?



Re: Adapting SwiftMQ logging to Log4j

Posted By:   Andreas_Mueller  
Posted On:   Saturday, April 20, 2002 12:40 AM

Yes, that's right. Normally, the Swiftlet API describes Extension Swiftlets only but here is how it works:

  • Extend com.swiftmq.swiftlet.LogSwiftlet

  • Implement the trace stuff (look into the Swiftlet API)

  • create a sys$log.jar and put it into kernel/sys$log

  • put all the other log4j jars into kernel/sys$log as well

  • create your own config.xml and put it into the kernel/sys$log

You can use the current config.xml as a template. Define your own properties (the log4j settings) there and use your class name in the "swiftlet" tag. Take a look into the Swiftlet API for property/entity definition.

For the shutdown hook I have to look into the code. Normally, it should work. Important to note that the shutdown hook shuts the router orderly down and writes a last checkpoint. Without that it will go through a recovery phase on startup.
About | Sitemap | Contact