JBoss ESB Logger
Logging when using a JBoss ESB service can be painful due to an overdose of SYSOUT/SYSERR log lines in your log file. This "plugin" provides a logging mechanism that solves this problem, free for you to use.
- Intended to be a drop in replacement for org.jboss.soa.esb.actions.SystemPrintln (save for the outputstream property)
- Automatically finds the service it is used in
- Configurable log levels (trace, debug, info, warn, error)
Included in the download is the jar file for use in your ESB, the Eclipse project (we use Eclipse 3.5 with JBoss Tools) and the JavaDoc.
How to use the plugin
To use this, download the plugin, extract the jar from the zip and include it in your project (this largely depends on your dependency management).
Then in your service definition you can add logging actions, such as this:
<action name="Your Message" class="nl.isaac.library.jboss.esb.util.Logger"> <property name="level" value="info" /> <property name="printFull" value="false" /> </action>
Information about the plugin
This plugin is a Logger utility action for use within JBoss ESB services.
It's intended to be a replacement for the org.jboss.soa.esb.actions.SystemPrintln logging action, with a twist, it gives you more control of the output. The logger uses the standard jboss logger to provide the output and as such allows you to specify the log level through the 'level' property (see Logger.Level enum set, a simple valueOf is performed to determine the level). The printFull and message properties also work here and work the same as org.jboss.soa.esb.actions.SystemPrintln with one slight change, when you enable 'printFull' it will 'touch' all properties of the message, forcing the deserialization of the properties. Aside from this, this action will not change the message, the pipeline will not be terminated. It will, by default, use the name of the action for the message.
The log category is set to the full class name of the Logger nl.isaac.library.jboss.esb.util.Logger plus the category and name of the service where you add the action to. So if you have a service in the category my-esb and with a name of service-part-one, the the full log category will be: nl.isaac.library.jboss.esb.util.Logger.my-esb:service-part-one
Tips and Tricks
These are the properties that the action supports:
|message||String||The message to prefix the log with, defaults to the name of the action.|
|printFull||Boolean||If false it will just print the body.
If true then it will touch the properties to force deserialization and print it out entirely.
This is ISAAC
ISAAC enables companies using internet technology in their core business processes to reduce costs and increase revenue. We create websites and portals, professional web shops, effective mobile applications and robust middleware. We are crazy about the internet and we love open source. We like to contribute to the OS community using this website.
Visit ISAAC website »