Skip to content

Commit 9136170

Browse files
authored
Prefix logging messages with [TRT] (#497)
1 parent 1cf89dd commit 9136170

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

ModelImporter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ bool ModelImporter::supportsModel(
374374
std::vector<size_t> topological_order;
375375
if (!toposort(model.graph().node(), &topological_order))
376376
{
377-
cout << "Failed to sort model topologically, exiting ..." << endl;
377+
LOG_ERROR("Failed to sort model topologically, exiting ...");
378378
return false;
379379
}
380380

@@ -408,7 +408,7 @@ bool ModelImporter::supportsModel(
408408
}
409409
else
410410
{
411-
std::cout << "Found unsupported node: " << tensorName << std::endl;
411+
LOG_WARNING("Found unsupported node: " << tensorName);
412412
// This is not a supported node, reset newSubGraph
413413
newSubGraph = true;
414414
allSupported = false;

onnx2trt_utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
do \
4040
{ \
4141
std::stringstream ss{}; \
42-
ss << __FILENAME__ << ":" << __LINE__ << ": " << msg; \
42+
ss << "[TRT]" << __FILENAME__ << ":" << __LINE__ << ": " << msg; \
4343
ctx->logger().log(severity, ss.str().c_str()); \
4444
} while (0)
4545

0 commit comments

Comments
 (0)