Skip to content

Commit abdafea

Browse files
Add missing guards around debug messages
Closes #195 Signed-off-by: Lisanna Dettwyler <[email protected]>
1 parent 895108f commit abdafea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: source/loader/ze_loader.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ namespace loader
340340
loaderLibraryPath = readLevelZeroLoaderLibraryPath();
341341
}
342342
#endif
343-
debug_trace_message("Using Loader Library Path: ", loaderLibraryPath);
343+
if (debugTraceEnabled)
344+
debug_trace_message("Using Loader Library Path: ", loaderLibraryPath);
344345

345346
// To allow for two different sets of drivers to be in use between sysman and core/tools, we use and store the drivers in two vectors.
346347
// alldrivers stores all the drivers for cleanup when the library exits.
@@ -424,7 +425,8 @@ namespace loader
424425
tracingLayerEnabled = true;
425426
}
426427
std::string tracingLayerLibraryPath = create_library_path(MAKE_LAYER_NAME( "ze_tracing_layer" ), loaderLibraryPath.c_str());
427-
debug_trace_message("Tracing Layer Library Path: ", tracingLayerLibraryPath);
428+
if (debugTraceEnabled)
429+
debug_trace_message("Tracing Layer Library Path: ", tracingLayerLibraryPath);
428430
tracingLayer = LOAD_DRIVER_LIBRARY( tracingLayerLibraryPath.c_str() );
429431
if(tracingLayer)
430432
{

0 commit comments

Comments
 (0)