Skip to content

Commit

Permalink
remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
iritb committed Jan 24, 2025
1 parent 2f40578 commit 64af916
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ProcessInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,9 @@ int ProcessInfo::ExtractCGroupContainerId(const std::string& content) {
}
}

Logger::Info("Before checking complex format: %s", ptr);
// Check for complex docker format
const char *complex_format_pos = strstr(ptr, complex_docker_service_prefix);
if (complex_format_pos != nullptr && complex_format_pos < line_end) {
Logger::Info("Complex format found: %s", complex_format_pos);
// Search for '/' before line_end
const char *id_start = nullptr;
for (const char *p = line_end; p >= complex_format_pos; --p) {
Expand All @@ -423,16 +421,13 @@ int ProcessInfo::ExtractCGroupContainerId(const std::string& content) {
break;
}
}
Logger::Info("ID start: %s", id_start);
if (id_start != nullptr) {
// make sure we have 12 characters left in the line before i read them
if (line_end > id_start && id_start + 12 <= line_end) {
_container_id = std::string(id_start, 12); // Extract the container ID from the end of the line
Logger::Info("Container ID: %s", _container_id.c_str());
return 0;
}
}
Logger::Warn("Invalid complex format: %s", ptr);
}

ptr = line_end + 1;
Expand Down

0 comments on commit 64af916

Please sign in to comment.