Skip to content

fix(error log): log only warnings raised in FV3's own files - #193

Merged
chodeus merged 3 commits into
betafrom
fix/error-log-own-files
Nov 15, 2026
Merged

chodeus merged 3 commits into
betafrom
fix/error-log-own-files

Conversation

@chodeus

@chodeus chodeus commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner
  • FV3's error handler now copies a warning into error.log only when a file under FV3's folder raised it; Unraid's own warnings (libvirt.php's "Resource ID… used as offset" with VM Manager debug on) stay in Unraid's phplog and no longer show in FV3's debug panel as FV3 errors.
  • New error_handler_test.php: real warnings from an FV3 file, Unraid's VM code and a folder whose name only starts like FV3's; error.log holds only the first, PHP's own log all three.
  • The fake Unraid's log check drops its libvirt exception: any line in FV3's error.log fails.

Summary by CodeRabbit

  • Bug Fixes
    • The plugin error log now contains non-fatal errors from FolderView3 files only. Errors from Unraid and other paths continue to be handled by PHP’s existing logger.
    • Suppressed errors and deprecations remain excluded from the plugin error log.

Unraid's own warnings (libvirt.php with VM Manager debug on) stay in its phplog
and no longer show in FV3's debug panel as FV3 errors. The fake Unraid's log
check drops its libvirt exception: any line in FV3's error.log fails.
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The error handler now logs non-fatal errors only when they originate inside the FolderView3 plugin directory. A standalone test checks warnings from plugin and non-plugin paths. The compatibility check now fails when FV3’s error log contains any line.

Changes: Error logging scope

Layer / File(s) Summary
Filter errors by source path
.github/unraid-compat/fake_logs.php, src/folder.view3/usr/local/emhttp/plugins/folder.view3/server/lib.php
The handler returns false for errors outside the FolderView3 directory. The compatibility check no longer excludes the libvirt.php resource-handle warning from FV3’s error log.
Validate error log output
.github/scripts/error_handler_test.php
The standalone test checks that the plugin error log contains only the FV3 warning and that PHP’s log contains warnings from all three test paths. It also checks for successful execution without output and removes its temporary directory.

Estimated code review effort: 3 (Moderate) | ~18 minutes

Merge Risk: Minimal · up to d07c6

The error handler now logs only warnings from FolderView3's own files, so Unraid warnings no longer show up as FV3 errors. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: the FV3 error handler now logs warnings only when they come from FV3's own files. The raw summary confirms the lib.php change restricts logging to files inside the pl…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: the FV3 error handler now logs warnings only when they come from FV3's own files. The raw summary confirms the lib.php change restricts logging to files inside the plugin directory, and the test and fake log check changes support that same behavior. The title is specific and matches the changeset, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e3879ce and d07c654.

Files selected for processing: 3

  • .github/scripts/error_handler_test.php
  • .github/unraid-compat/fake_logs.php
  • src/folder.view3/usr/local/emhttp/plugins/folder.view3/server/lib.php

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

@chodeus

chodeus commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Action performed

Full review finished.

@chodeus
chodeus marked this pull request as ready for review November 15, 2026 15:38
@chodeus
chodeus merged commit 6c42d02 into beta Nov 15, 2026
21 checks passed
@chodeus
chodeus deleted the fix/error-log-own-files branch November 15, 2026 15:38
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