Aug 20th update

This commit is contained in:
Ned Wright
2024-08-21 08:42:14 +00:00
parent ca31aac08a
commit 110f0c8bd2
13 changed files with 155 additions and 15 deletions

View File

@@ -35,7 +35,14 @@ ContainerSvcStream::~ContainerSvcStream()
void
ContainerSvcStream::sendLog(const Report &log)
{
auto svc_host = getConfigurationWithDefault(default_host, "Logging", "Container Log host");
const char* host_env_var = getenv("TUNING_HOST");
string host;
if (host_env_var != nullptr && strlen(host_env_var) > 0) {
host = string(host_env_var);
} else {
host = default_host;
}
auto svc_host = getConfigurationWithDefault(host, "Logging", "Container Log host");
auto svc_log_uri = getConfigurationWithDefault(default_log_uri, "Logging", "Container Log URI");
LogRest rest(log);
@@ -66,7 +73,14 @@ ContainerSvcStream::sendLog(const LogBulkRest &logs, bool persistence_only)
return;
}
auto svc_host = getConfigurationWithDefault(default_host, "Logging", "Container Log host");
const char* host_env_var = getenv("TUNING_HOST");
string host;
if (host_env_var != nullptr && strlen(host_env_var) > 0) {
host = string(host_env_var);
} else {
host = default_host;
}
auto svc_host = getConfigurationWithDefault(host, "Logging", "Container Log host");
auto svc_log_uri = getConfigurationWithDefault(default_bulk_uri, "Logging", "Container Bulk Log URI");
MessageMetadata rest_req_md(svc_host, 80);