System Projects Reference > Situational Awareness System Projects > Situational Awareness Include Project > Debug_SetTraceLevel

Debug_SetTraceLevel

Sets the level of tracing. Setting the trace level to Information will include Warning and Error. Setting it to Warning will include Error. The tracing information is stored in the syslog.dat file.

Note: Setting the trace level to Information can log a lot of information to the syslog.dat file and may affect performance.

You can also configure the default for your project by setting the parameter [DEBUG]UserTraceMode. When setting the trace level through the parameter, you need to set it to the numeric value of the trace level:

Setting the trace level to 0 (TRACE_Suspend) will stop the logging.

Syntax

Debug_SetTraceLevel(INT nTraceLevel)

nTraceLevel

The trace level labels defined in the sa_include project. The default trace level is 2.

Return Value

Returns -1 if the specified trace level does not exist. Returns 1 if setting the level was successful.

Example

Debug_SetTraceLevel(TRACE_Error);

Related Functions

Published June 2018