From 8bbbaf99a7c0c88fa867fbfef7bcb917e9554468 Mon Sep 17 00:00:00 2001 From: nnshah1 Date: Tue, 14 May 2024 16:16:59 -0700 Subject: [PATCH 1/2] updating to use new logging macros --- src/tensorflow.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/tensorflow.cc b/src/tensorflow.cc index b512996..6daefe1 100644 --- a/src/tensorflow.cc +++ b/src/tensorflow.cc @@ -1828,11 +1828,8 @@ TRITONSERVER_Error* ModelState::ValidateModelConfig() { // We have the json DOM for the model configuration... - triton::common::TritonJson::WriteBuffer buffer; - RETURN_IF_ERROR(ModelConfig().PrettyWrite(&buffer)); - LOG_MESSAGE( - TRITONSERVER_LOG_VERBOSE, - (std::string("model configuration:\n") + buffer.Contents()).c_str()); + LOG_JSON_VALUE( + TRITONSERVER_LOG_VERBOSE, "model_configuration", ModelConfig()); triton::common::TritonJson::Value ios; RETURN_IF_ERROR(ModelConfig().MemberAsArray("input", &ios)); @@ -2610,13 +2607,14 @@ TRITONBACKEND_Initialize(TRITONBACKEND_Backend* backend) RETURN_IF_ERROR( TRITONBACKEND_BackendConfig(backend, &backend_config_message)); + LOG_JSON_MESSAGE( + TRITONSERVER_LOG_INFO, "backend configuration", backend_config_message); + const char* buffer; size_t byte_size; + RETURN_IF_ERROR(TRITONSERVER_MessageSerializeToJson( backend_config_message, &buffer, &byte_size)); - LOG_MESSAGE( - TRITONSERVER_LOG_INFO, - (std::string("backend configuration:\n") + buffer).c_str()); triton::common::TritonJson::Value backend_config; if (byte_size != 0) { From 4ac7cf0f6d8a012938b5a337de88c750f63d1a94 Mon Sep 17 00:00:00 2001 From: nnshah1 Date: Wed, 15 May 2024 14:13:22 -0700 Subject: [PATCH 2/2] updated based on review comments --- src/tensorflow.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tensorflow.cc b/src/tensorflow.cc index 6daefe1..77db41c 100644 --- a/src/tensorflow.cc +++ b/src/tensorflow.cc @@ -2607,7 +2607,7 @@ TRITONBACKEND_Initialize(TRITONBACKEND_Backend* backend) RETURN_IF_ERROR( TRITONBACKEND_BackendConfig(backend, &backend_config_message)); - LOG_JSON_MESSAGE( + LOG_SERVER_MESSAGE( TRITONSERVER_LOG_INFO, "backend configuration", backend_config_message); const char* buffer;