⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

fix(log): prevent sink destruction caused by backend exceptions#4694

Merged
ReenigneArcher merged 1 commit intoLizardByte:masterfrom
qiin2333:fix_log_loss
Feb 10, 2026
Merged

fix(log): prevent sink destruction caused by backend exceptions#4694
ReenigneArcher merged 1 commit intoLizardByte:masterfrom
qiin2333:fix_log_loss

Conversation

@Yundi339
Copy link
Contributor

Description

Currently, if the backend throws an exception (e.g., disk full, file locking issues, or I/O errors), the background logging thread crashes and terminates. This results in the silent loss of all subsequent log records.

Added sink->set_exception_handler(bl::make_exception_suppressor()); to ensure the logging thread stays alive even if a single write operation fails.

Screenshot

Issues Fixed or Closed

Roadmap Issues

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
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Feb 10, 2026

Bundle Report

Bundle size has no change ✅

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 15.52%. Comparing base (97b6168) to head (d4fbf01).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4694      +/-   ##
==========================================
+ Coverage   15.51%   15.52%   +0.01%     
==========================================
  Files          97       97              
  Lines       20468    20469       +1     
  Branches     9398     9398              
==========================================
+ Hits         3175     3178       +3     
- Misses      15130    15826     +696     
+ Partials     2163     1465     -698     
Flag Coverage Δ
Archlinux 11.20% <100.00%> (+<0.01%) ⬆️
FreeBSD-14.3-aarch64 ?
FreeBSD-14.3-amd64 13.23% <100.00%> (-0.01%) ⬇️
Homebrew-ubuntu-22.04 13.43% <100.00%> (+<0.01%) ⬆️
Linux-AppImage 11.61% <100.00%> (+<0.01%) ⬆️
Windows-AMD64 13.49% <100.00%> (+<0.01%) ⬆️
Windows-ARM64 12.34% <100.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
src/logging.cpp 58.57% <100.00%> (-0.43%) ⬇️

... and 60 files with indirect coverage changes

@ReenigneArcher ReenigneArcher merged commit e22c5c9 into LizardByte:master Feb 10, 2026
91 of 93 checks passed
@Yundi339 Yundi339 deleted the fix_log_loss branch February 12, 2026 02:18
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.

2 participants