Skip to content

feat(logging): standardize C++, Python, and Rust logging - #86

Open
ReenigneArcher wants to merge 7 commits into
masterfrom
feat/standardize-logging
Open

ReenigneArcher wants to merge 7 commits into
masterfrom
feat/standardize-logging

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Description

Add reusable C++, Python, and Rust logging support with the same UTC millisecond format, project-root-relative source locations, severity labels/colors, literal-secret redaction, and UTF-8 rolling files (10 MiB, five backups by default). Multiple named loggers can share independently filtered stdout, file, callback/webhook, and native destinations.

Use spdlog 1.17.0 for C++, Python's standard logging handlers, and spdlog-rs for Rust. Keep native async queues, memory buffers, filters, error handling, and the Rust log facade available. Add a shared golden-output fixture, cross-platform Rust CI and coverage, production-only CMake install/consumer checks, and a documented migration inventory covering every roadmap project. Consumer repositories are unchanged.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

  • Python: 41 tests pass, 100% repository Python coverage; flake8 passes.
  • UCRT64 C++: 29 tests pass and two platform-specific tests skip; the independent installed-package consumer builds and runs.
  • UCRT64 Rust: 11 tests pass; cargo fmt and Clippy with warnings denied pass.
  • Shared fixtures and rotation tests verify identical bytes, source roots, Unicode byte boundaries, append/restart, bounded backups, oversized records, independent destinations, transport errors, queues and concurrent writes. Additional regressions cover invalid paths, blocked rotation, safe flushing and recovery, plus the MSVC clock range.
  • Hosted checks pass for all five C++ build configurations, Python and Rust on Linux/macOS/Windows, installed CMake consumers, rustdoc, strict Doxygen/Read the Docs, common lint, CodeQL and Sonar. Codecov confirms 100% patch coverage, with no uncovered or partial changed lines. Sonar reports zero open PR issues and zero unreviewed hotspots.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

Validation uses the final pushed PR head; the roadmap issue remains open for downstream migrations.

@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (fabaafe) to head (088a679).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##            master       #86    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            3         7     +4     
  Lines          217       684   +467     
  Branches        13        90    +77     
==========================================
+ Hits           217       684   +467     
Flag Coverage Δ
Linux-Clang 66.00% <60.00%> (-19.72%) ⬇️
Linux-GCC 93.91% <92.03%> (-6.09%) ⬇️
Linux-python 100.00% <100.00%> (ø)
Linux-rust 100.00% <100.00%> (?)
Windows-MSVC 100.00% <100.00%> (ø)
Windows-MinGW-UCRT64 93.91% <92.03%> (-6.09%) ⬇️
Windows-python 100.00% <100.00%> (ø)
macOS 66.66% <60.86%> (-19.05%) ⬇️
macOS-python 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
lizardbyte_common/logging.py 100.00% <100.00%> (ø)
rust/logging.rs 100.00% <100.00%> (ø)
src/common/logging.cpp 100.00% <100.00%> (ø)
src/include/lizardbyte/common/logging.h 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fabaafe...088a679. Read the comment docs.

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

1 participant