mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3287] [MERGED] fix(server): call isRequestLoggingDisabled() so LOG_DISABLE_REQUEST_LOGGING actually works #5864
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5864
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3287
Author: @kolacheee
Created: 7/5/2026
Status: ✅ Merged
Merged: 7/5/2026
Merged by: @SpicyMarinara
Base:
staging← Head:claude/recursing-roentgen-3a4a90📝 Commits (1)
5a1e3bcfix(server): call isRequestLoggingDisabled() so LOG_DISABLE_REQUEST_LOGGING works📊 Changes
4 files changed (+7 additions, -4 deletions)
View changed files
📝
docs/CONFIGURATION.md(+1 -1)📝
docs/REMOTE_ACCESS.md(+2 -2)📝
packages/server/src/app.ts(+1 -1)📝
packages/server/src/config/env-watcher.ts(+3 -0)📄 Description
Why
LOG_DISABLE_REQUEST_LOGGINGis silently a no-op today.In
packages/server/src/app.ts, the Fastify factory receives the function referenceisRequestLoggingDisabledinstead of the result of calling it:Fastify treats
disableRequestLoggingas a boolean, and a function object is always truthy, so per-request access logging is permanently disabled no matter whatLOG_DISABLE_REQUEST_LOGGINGis set to. A user who setsLOG_DISABLE_REQUEST_LOGGING=false(or leaves it at its default offalse) and expects to see Fastify'sGET /api/... completedaccess logs never gets them.This same bug is documented as supporting evidence in #3260 (item 1: "app.ts passes disableRequestLogging the function reference … always truthy, so Fastify request logging is permanently off"). That issue is scoped to
REMOTE_ACCESS.mddocs drift and assigned to the maintainer; this PR fixes the underlying code defect plus the restart-classification half, tracked by its own issue #3288.What changed
packages/server/src/app.ts— call the function:disableRequestLogging: isRequestLoggingDisabled(). Now the env var (and theprompt-connectionspreset, which routes through the same function) actually control request logging.Restart-classification fix. Even with the call fixed, Fastify reads
disableRequestLoggingonce at boot from the factory options — it cannot hot-reload. The env watcher and docs previously impliedLOG_DISABLE_REQUEST_LOGGINGapplies without a restart, which is now (and always was) wrong. Moved it to the restart-required side:packages/server/src/config/env-watcher.ts— addedLOG_DISABLE_REQUEST_LOGGINGtoRESTART_REQUIRED_KEYS, so changing it now logs the "requires a server restart to take effect" warning.docs/REMOTE_ACCESS.md— moved it from the hot-reload list to the restart-required list under When a restart is required.docs/CONFIGURATION.md— added a "Requires restart" note to its table row, matching the convention used by other boot-bound vars.LOG_LEVELandLOG_PRESETare intentionally left as hot-reloadable — the env watcher re-applies the logger level on reload; only the request-logging toggle is bound at boot.Manual verification (not yet done — please verify)
LOG_LEVEL=info(default iswarn, and Fastify access logs emit atinfo, sowarnhides them regardless) withLOG_DISABLE_REQUEST_LOGGINGunset/false, start the server, hit any/api/...route, and confirmGET /api/... completedrequest logs now appear.LOG_LEVEL=infoandLOG_DISABLE_REQUEST_LOGGING=true, confirm those per-request logs are suppressed.LOG_DISABLE_REQUEST_LOGGINGin.envwhile the server is running and confirm the[env-watcher]warning now says a restart is required (and that the change indeed does not take effect until restart).Validation
pnpm check(TypeScript + ESLint).Targets
stagingperCONTRIBUTING.md § Branches/CLAUDE.md.Fixes #3288. Related: #3260.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.