isTraceEnabled()

Compare the specified trace level with the current trace level of the collaboration.

Syntax

public Boolean isTraceEnabled(int traceLevel)
 

Parameters

traceLevel
The trace level to compare with the current trace level.

Return values

Returns true if the current system trace level is set to the specified trace level; returns false if the two trace levels are not the same.

Notes

The isTraceEnabled() method is useful in determining if a trace message should or should not be logged. Because tracing can decrease performance, this method is useful in the development phase of a project.

Examples

if ( isTraceEnabled(3) )
    {
    trace("Print this level-3 trace message");
    }
 

Copyright IBM Corp. 2003, 2004