Skip to content

49 change logging library and code improvement#51

Merged
Cadons merged 5 commits intomainfrom
49-change-logging-library-and-code-improvement
May 29, 2025
Merged

49 change logging library and code improvement#51
Cadons merged 5 commits intomainfrom
49-change-logging-library-and-code-improvement

Conversation

@Cadons
Copy link
Copy Markdown
Owner

@Cadons Cadons commented May 29, 2025

No description provided.

@Cadons Cadons linked an issue May 29, 2025 that may be closed by this pull request
@Cadons Cadons requested a review from Copilot May 29, 2025 19:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Comment thread src/TusClient.cpp Outdated
Comment thread include/TusClient.h
Comment thread include/TusClient.h Outdated
Comment thread test/TusClientTest.cpp Outdated
…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`.
@Cadons Cadons merged commit bac0272 into main May 29, 2025
13 checks passed
@Cadons Cadons deleted the 49-change-logging-library-and-code-improvement branch August 2, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change Logging library and code improvement

2 participants