WSO2 SOA Enablement Server for Java™ comes with two logging systems, the in-house waspLogger and log4j. By default, waspLogger is used.
The waspLogger is simple to use, with one level of logging (0-4) set globally across WSO2 SOA Enablement Server in the idoox.debug.level property, described in the preceeding table of system properties. Note that level 4 logging is only available in the non-stripped distribution of WSO2 SOA Enablement Server for Java. Also note that how to set properties is described in System Properties.
You can use log4j instead of waspLogger by setting the value of idoox.debug.logger to log4j. An explanation of using log4j is outside the scope of this documentation. For more information, see the Apache log4j documentation.
When setting log4j as the logging system, you should also set the log4j.configuration property to point to the location of the log4j configuration file. The following command is an example where the configuration file is WASP_HOME/conf/log4j.config:
server -Didoox.debug.logger=log4j -Dlog4j.configuration=conf/log4j.config start
Normally all exceptions thrown by a service are logged to System.err and printed on the console. This can be suppressed either universally or for individual services.
![]() | Important |
---|---|
Exception printing can only be suppressed if log4j logging is used. |
Universal suppression of exceptions The log4j includes a special category called com.systinet.wasp.services. When an exception occurs, a descendant of this category is created, based on the service implementataion class or object name. The debug level for this category is set in conf/log4j.config, in the following line:
# All services category log4j.category.com.systinet.wasp.services=INFO,serviceLog
Changing the level from INFO to ERROR will cause only exceptions of that level or worse to be printed.
Suppressing exceptions for individual services Exception printing is suppressed for individual services by adding an appended com.systinet.wasp.services category with the fully qualified class name of the service. In Example 226, invocation.async.client_proxy.src.BasicServiceImpl is the fully qualified class name, and the entire line would be added to conf/log4j.config to suppress non-FATAL exceptions for the BasicService.