Logging level
Use this information to learn about trace levels when you are logging information to the Cúram server and to learn how to use trace options.
When you are logging to the Cúram server, trace level needs to be considered. These settings can be used to guard the calls that are 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 options:
- curam.util.resources.Trace.kTraceOff
- curam.util.resources.Trace.kTraceOn
- curam.util.resources.Trace.kTraceVerbose
- curam.util.resources.Trace.kTraceUltraVerbose
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:
- trace_on
- trace_verbose
- trace_ultra_verbose
The amount of logging done by your application code reflects the current logging level of the application. The following code extract demonstrates this operation:
if (curam.util.resources.Trace.atLeast(
curam.util.resources.Trace.kTraceOn)) {
curam.util.resources.Trace.kTopLevelLogger.info(
"hello world.");
}
The Cúram infrastructure supports a number of standard trace options that provide a convenient view on top of the trace levels. All of the options result in significant information to be written to the log and has a significant impact on the performance of the application. The following are the properties that might 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).
Property Name |
Meaning |
Enabled |
|---|---|---|
curam.trace.servercalls |
Trace server method invocations by remote clients. This information includes the name of the user who is requesting the invocation. |
O |
curam.trace.methods |
Trace all business object method invocation. |
V |
curam.trace.method_args |
Memory dump arguments, including their types, to business object method invocations. |
U |
curam.trace.sql |
Trace SQL statements run by entity objects. |
V |
curam.trace.sql_args |
Memory dump results of SQL select statements. |
U |
curam.trace.rules |
Enables logging of rules |
U |
curam.trace.smtp |
Trace the messages that are sent to the mail server. |