GetTraceLevel method: OptEngine class
Syntax
GetTraceLevel(component)
Description
GetTraceLevel gets the severity level at which events are logged for a given component.
The DetailedStatus OptEngine property indicates the completion status of the OptEngine method call GetTraceLevel. For GetTraceLevel, DetailedStatus can have the value:
-
%OptEng_Success.
This indicates that the function completed successfully.
-
%OptEng_Fail.
This indicates that the function failed.
-
%OptEng_Method_Disabled.
This indicates that the method is disabled or not valid.
-
%OptEng_DB_Updates_Pending.
This indicates that database updates are pending.
Parameters
| Parameter | Description |
|---|---|
|
component |
Enter one of the following PeopleCode constants: Opt_Engine, Opt_Utility, Opt_Datacache, or Opt_Plugin. |
Returns
Returns one of the following.
-
%Severity_Fatal
-
%Severity_Status
-
%Severity_Error
-
%Severity_Warn
-
%Severity_Info
-
%Severity_Trace1
-
%Severity_Trace2
Example
Local OptEngine &myopt;
Local integer &tracelevel;
&myopt = GetOptEngine("PATSMITH");
&tracelevel = &myopt.GetTraceLevel(%Opt_Engine);
if &myopt.DetailedStatus = %OptEng_Success then
if (&tracelevel = %Severity_Info_ then
winmessage("Severity level for the OptEngine is 'Info'");
End-if;
End-if;