Logging Level

When logging the Cúram server, trace level should be taken into consideration. These settings can be used to guard the calls made into log4j to improve the performance in environments where tracing is not required1.

The current level of tracing can be checked by calling the method:

curam.util.resources.Trace.atLeast(Trace t)

where the parameter to this method can be one of the following:

The trace level for your application can be specified by setting the curam.trace property as defined in Cúram Configuration Settings. Valid values for this property are:

The amount of logging done by your application code should reflect the current logging level of the application. The following code extract demonstrates this:

Figure 1. Logging example in application code
if (curam.util.resources.Trace.atLeast(
                     curam.util.resources.Trace.kTraceOn)) {
    curam.util.resources.Trace.kTopLevelLogger.info(
      "hello world.");
}

The Cúram infrastructure provides support for a number of standard trace options which provide a convenient view on top of the trace levels. All of the options result in significant information being written to the log and will have a significant impact on the performance of the application. The following are the properties that may be set as described in Cúram Configuration Settings, and the level at which they are set at default (O is On, V is Verbose, U is Ultra).

Table 1. Diagnostic Tracing Options

Property Name

Meaning

Enabled

curam.trace.servercalls

Trace server method invocations by remote clients. This includes the name of the user requesting the invocation.

O

curam.trace.methods

Trace all business object method invocation.

V

curam.trace.method_args

Dump arguments, including their types, to BO method invocations.

U

curam.trace.sql

Trace SQL statements executed by entity objects.

V

curam.trace.sql_args

Dump results of SQL select statements.

U

curam.trace.rules

For more information refer to the Runtime Rules Logging in the Cúram Rules Codification Guide.

U

curam.trace.smtp

Trace the messages that are sent to the mail server.

 
1 While log4j is designed to impose a minimal overhead it cannot avoid the cost of the parameter construction inside the method invocation. Application developers must take this into consideration.