Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress User Guide

6.3 The Web Services Logger for Client Applications

The Web services logger is available to client-side applications.


While it is possible to use the Web services logger in services, it is not recommended. Rather, use the Agent logger, discussed in
Section 6.2.

Logging is implemented in the generated sample application by default. The default client logging level is Info, resulting in all messages reported.

The defined log levels are:

Table 10: Default Logging Levels for the Web Services Logger

Level Description Default
NONE No logging  
FATAL Fatal messages only  
ERROR Error and Fatal  
WARN Warn, Error, and Fatal  
INFO Info, Warn, Error, and Fatal Client default level

For logging set to some level, messages at or above that level are reported. For example, for a level of Error, messages defined as Error or Fatal are reported. To have all messages reported, set the level to Info, which is the default in the generated client code.

The logger is implemented as a message handler and invoked statically via the rwsf::HandlerManager class. The simplest way to log a message is to invoke the logger with a string and an optional log level describing the severity of the message:

In client code, the invokeLogger() method uses the logger defined in the client-handlers.xml file. If no logger configuration is found, then logging defaults to the default log file, webservice.log.

You can log events in your client in one of two ways:

By default, the code generator uses the first method, creating a logger handler and placing its configuration in the generated conf/client-handlers.xml file. The client code then loads the configuration using the loadConfiguration() method:

If you undefine the logger by commenting out the above line in the generated client implementation or removing the logger element in the client-handlers.xml, then only Error and Fatal messages are logged to the webservice.log file.

For more information on the Web services logger and client logging, please see Chapter 12, "Web Service Logging," in the HydraExpress Web Service Development Guide.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.