49 change logging library and code improvement#51
Merged
Conversation
…te logging system to GLog, and enhance FileChunker and TUS client functionality with better error handling and chunk management
…matting utilities
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the EasyLoggingpp library with Google’s glog backend and modernizes several code paths with C++ improvements.
- Swap logging implementation to GLoggingService and remove EasyLoggingService.
- Update build configurations (vcpkg, CMake) to use glog.
- Refactor TusClient and FileChunker for std::format, std::clamp, header parsing, and add upload-handling helpers.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vcpkg.json | Replace easyloggingpp with glog |
| vcpkg-configuration.json | Update registry baseline |
| test/TusClientTest.cpp | Update tests to use std::format, std::clamp, and GLoggingService |
| src/logging/GLoggingService.cpp | New glog-based GLoggingService implementation |
| src/logging/EasyLoggingService.cpp | Remove deprecated EasyLoggingService |
| src/chunk/FileChunker.cpp | Use std::format and modern if-init for cleanup |
| src/TusClient.cpp | Switch to GLoggingService, extract header parsing, add handlers |
| include/logging/GLoggingService.h | Add GLoggingService header with inline counters |
| include/http/IHttpClient.h | Simplify destructor to = default |
| include/exceptions/TUSException.h | Use inherited constructor for TUSException |
| include/chunk/FileChunker.h | Mark getters [[nodiscard]], default destructor |
| include/cache/TUSFile.h | Add explicit and tighten member visibility |
| include/TusClient.h | Update getTusServerInformation signature, add private handlers |
| CMakeLists.txt | Remove EasyLoggingpp, add glog |
Comments suppressed due to low confidence (2)
src/TusClient.cpp:212
- Unqualified 'string' type is not defined in this scope; should be 'std::string' or add 'using std::string'.
void TusClient::handleSuccessfulUpload(const string &header) {
src/TusClient.cpp:296
- Unqualified 'function' and 'string' types are undefined; use 'std::function' and 'std::string', and ensure is included.
function<void(string, string)> onSuccess = [this]([[maybe_unused]] const string &header,
…d functionality - Replace hardcoded cleanup loop with `MAX_CLEANUP_FILES` constant. - Add `m_retry` member to manage upload retry logic. - Update function comments for improved clarity. - Refine retry logic in `handleUploadConflict` using `m_retry`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.