Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to use logging macros for JSON values #253

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/onnxruntime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -936,11 +936,8 @@ ModelState::AutoCompleteConfig()
}

if (TRITONSERVER_LogIsEnabled(TRITONSERVER_LOG_VERBOSE)) {
triton::common::TritonJson::WriteBuffer buffer;
RETURN_IF_ERROR(ModelConfig().PrettyWrite(&buffer));
LOG_MESSAGE(
TRITONSERVER_LOG_INFO,
(std::string("post auto-complete:\n") + buffer.Contents()).c_str());
LOG_JSON_VALUE(
TRITONSERVER_LOG_VERBOSE, "post auto-complete:", ModelConfig());
}

return nullptr; // success
Expand Down Expand Up @@ -2828,13 +2825,13 @@ TRITONBACKEND_Initialize(TRITONBACKEND_Backend* backend)
RETURN_IF_ERROR(
TRITONBACKEND_BackendConfig(backend, &backend_config_message));

LOG_SERVER_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;
TRITONSERVER_Error* err = nullptr;
Expand Down
Loading