Skip to content

Handle frailbox logger file failures - #30

Open
xxCodexIAxx wants to merge 5 commits into
GautamKumarOffical:mainfrom
xxCodexIAxx:bounty/frailbox-logger-errors-1782674394
Open

Handle frailbox logger file failures#30
xxCodexIAxx wants to merge 5 commits into
GautamKumarOffical:mainfrom
xxCodexIAxx:bounty/frailbox-logger-errors-1782674394

Conversation

@xxCodexIAxx

Copy link
Copy Markdown

Summary

  • Improves frailbox legacy logger handling for log file open, buffering, write, flush, and close failures.
  • Falls back to stderr with a clear diagnostic instead of dropping logs or leaving a broken file stream active.
  • Adds a fallback counter for diagnostics and test verification.
  • Adds a small C harness plus make test-logger-errors.
  • Documents the fallback behavior in operations docs.

Changes

  • frailbox/src/logger.c
    • Adds a shared fallback helper for file operation failures.
    • Detects fputs / fflush failures and switches future writes to stderr.
    • Reports close/flush shutdown failures without aborting.
    • Adds log_get_fallback_count().
  • frailbox/include/logger.h
    • Declares the fallback counter API.
  • frailbox/tests/test_logger_errors.c
    • Verifies normal file logging, open failure fallback, and write failure fallback.
  • frailbox/Makefile
    • Adds make test-logger-errors.
  • docs/OPERATIONS.md
    • Documents legacy logger fallback behavior and the focused harness.

Testing

  • Intended focused test: cd frailbox && make test-logger-errors.
  • Intended full validation: python3 build.py.
  • I could not compile or run C tests locally because this environment does not have gcc available, and full repository execution is blocked by local safety policy.

Bounty

Fixes #20.

Payout wallet: 0x776CbBb63D81c08B4090DB503eAE7FDb8fBd7c6f

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.

$5 BOUNTY: [C] Improve frailbox logger error handling

1 participant