The RW_TRACE_LEVEL Environment Variable
The second method is the RW_TRACE_LEVEL environment variable, which the trace manager uses to “pre-filter” trace events. The environment variable can be set to FATAL, ERROR, WARNING, INFO, TEST, DEBUG, ENTRY, or NONE to filter out all trace events. This facility defaults to ENTRY if the environment variable is left unset. The default allows all trace messages through to clients, so if you choose not to use this facility, you can safely ignore it.
Using the RW_TRACE_LEVEL environment variable is less efficient than compile-time filtering with the RW_USER_TRACE_LEVEL macro, because the trace events are still generated. The environment variable is slightly more efficient than using a level filter, however. Like all environment variables used by the Execution Tracing package, RW_TRACE_LEVEL is checked only once, when the program starts. If you need to control trace output by severity level while the program is executing, you must use a level filter.