Skip to content

Commit bf6510a

Browse files
authored
Set proper log severity in HTTP transport (#258)
* Set proper log severity in HTTP transport * bump
1 parent b18e9ca commit bf6510a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ endif()
1717

1818
# Define project
1919
project(Monitoring
20-
VERSION 3.8.7
20+
VERSION 3.8.8
2121
DESCRIPTION "O2 Monitoring library"
2222
LANGUAGES CXX
2323
)

examples/2-TaggedMetrics.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main()
1212

1313
// Configure monitoring
1414
// Pass string with list of URLs as parameter
15-
auto monitoring = MonitoringFactory::Get("stdout://");
15+
auto monitoring = MonitoringFactory::Get("influxdbv2://localhost:8086/?bucket=adam&org=adam&token=v0SbCG4TRvHbHk82lckOT-T6iYY5VbGlXqOUnQlyaJNlT43eRnK_U8MllQT2kctwPFNwIqTO3HK4mnmGDCXk9g==");
1616

1717
/// Add global tags
1818
monitoring->addGlobalTag("name", "test");

src/Transports/HTTP.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ void HTTP::send(std::string&& post)
5555
response = curl_easy_perform(mCurl);
5656
curl_easy_getinfo(mCurl, CURLINFO_RESPONSE_CODE, &responseCode);
5757
if (response != CURLE_OK) {
58-
MonLogger::Get() << "HTTP Tranport " << curl_easy_strerror(response) << MonLogger::End();
58+
MonLogger::Get(Severity::Error) << "HTTP Tranport " << curl_easy_strerror(response) << MonLogger::End();
5959
}
6060
if (responseCode < 200 || responseCode > 206) {
61-
MonLogger::Get() << "HTTP Transport: Response code : " << std::to_string(responseCode) << MonLogger::End();
61+
MonLogger::Get(Severity::Error) << "HTTP Transport: Response code : " << std::to_string(responseCode) << MonLogger::End();
6262
}
6363
}
6464

0 commit comments

Comments
 (0)