Chapter 4. Custom Logging in the Oracle SOA Suite

This chapter contains the following recipes:

  • Logging to a custom file
  • Configuring custom handlers
  • Logging exceptions
  • Enabling logging on the BPEL server
  • Redirecting System.out and System.err files
  • Setting up a rotation logfile

Introduction

We have covered advanced tracing and logging techniques in Chapter 3, Advanced Tracing and Logging. Occasionally, we may need functionality that is not a part of the vendor product. In such cases, additional workaround and customization techniques are suitable for logging and tracing purposes. One of the most common techniques is to set up a mechanism to decouple the interesting part of logging information into a separate logging file. To fine-tune the logging, we define various logging handlers which help us to capture the wanted information.

Another aspect of logging is presentation of exceptions and faults in the logfiles. The captured information must be taken correctly and with the proper level of severity. In the Oracle SOA Suite, important sources of information can be found in the audit trail. In this chapter, we show how to set different levels of audit trail.

Sometimes, we encounter a situation where some part of the application or the third-party library prints useful information to the standard output and error files. Our job is to pick up such information and redirect it to the logfile.

Depending on the tracing level, the amount of tracing and logging information can grow significantly. For that purpose, it is worth considering the usage of rotation logfiles. Most logging frameworks and the ODL (Oracle Diagnostic Logging) support time-based and size-based log rotation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset