Skip to content

Commit 3146857

Browse files
Show more log info in prod build (#1431) (#1431)
Change log level for error message when max number of HTTP requests has been reached. Add status code for failed HTTP requests. Relates-To: IOTSDK-19103 Signed-off-by: Nazar Kacharaba <[email protected]>
1 parent 3a3021b commit 3146857

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

olp-cpp-sdk-core/src/http/ios/OLPNetworkIOS.mm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2019-2021 HERE Europe B.V.
2+
* Copyright (C) 2019-2023 HERE Europe B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -142,11 +142,11 @@
142142
{
143143
std::lock_guard<std::mutex> lock(mutex_);
144144
if (http_client_.activeTasks.count >= max_requests_count_) {
145-
OLP_SDK_LOG_DEBUG_F(kLogTag,
146-
"Send failed - reached max requests "
147-
"count=%lu/%lu, url=%s",
148-
http_client_.activeTasks.count, max_requests_count_,
149-
request.GetUrl().c_str());
145+
OLP_SDK_LOG_WARNING_F(kLogTag,
146+
"Send failed - reached max requests "
147+
"count=%lu/%lu, url=%s",
148+
http_client_.activeTasks.count, max_requests_count_,
149+
request.GetUrl().c_str());
150150
return SendOutcome(ErrorCode::NETWORK_OVERLOAD_ERROR);
151151
}
152152

olp-cpp-sdk-dataservice-read/src/repositories/PrefetchTilesRepository.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2019-2022 HERE Europe B.V.
2+
* Copyright (C) 2019-2023 HERE Europe B.V.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -417,8 +417,9 @@ PrefetchTilesRepository::DownloadVersionedQuadTree(
417417

418418
if (quad_tree.status != olp::http::HttpStatusCode::OK) {
419419
OLP_SDK_LOG_WARNING_F(kLogTag,
420-
"GetSubQuads failed(%s, %" PRId64 ", %" PRId32 ")",
421-
tile_key.c_str(), version, depth);
420+
"GetSubQuads failed(%s, %" PRId64 ", %" PRId32
421+
"), status_code='%d'",
422+
tile_key.c_str(), version, depth, quad_tree.status);
422423
return QuadTreeResponse(
423424
client::ApiError(quad_tree.status, quad_tree.response.str()),
424425
quad_tree.GetNetworkStatistics());

0 commit comments

Comments
 (0)