mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3288] LOG_DISABLE_REQUEST_LOGGING does nothing — Fastify request logging is always off #1783
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#1783
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?
Originally created by @kolacheee on GitHub (Jul 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3288
Originally assigned to: @SpicyMarinara on GitHub.
What's wrong
The
LOG_DISABLE_REQUEST_LOGGINGenvironment variable has no effect. Fastify's per-request access logs (the... GET /api/... request completedlines) are always off, no matter what you set the variable to.The cause is a one-character bug in
packages/server/src/app.ts. The Fastify factory is handed the logging helper function itself instead of the value it returns:Fastify expects a boolean here. A function is always "truthy", so Fastify reads it as
trueand turns request logging off permanently. It should beisRequestLoggingDisabled()— with the parentheses, so it actually runs and returns true/false.Try it yourself
.env, setLOG_LEVEL=info. (Request logs only print atinfoor lower — the defaultwarnhides them regardless, which is why this is easy to miss.)LOG_DISABLE_REQUEST_LOGGINGunset, or set it tofalse./api/...route.... GET /api/chats ... request completed.LOG_DISABLE_REQUEST_LOGGINGbetweentrueandfalsechanges nothing either way.Knock-on effect for the docs
Fastify reads this option only once, when the server boots, so the flag can't take effect on the fly — it needs a restart. The docs currently list
LOG_DISABLE_REQUEST_LOGGINGamong the variables that hot-reload without a restart (docs/REMOTE_ACCESS.md,docs/CONFIGURATION.md), which is wrong; it belongs on the restart-required side.Fix
Call the function (
isRequestLoggingDisabled()), and move the variable to the restart-required lists in both docs and inRESTART_REQUIRED_KEYS(packages/server/src/config/env-watcher.ts). Fix is in PR #3287.Related: #3260 — a docs audit that first noticed this while documenting the "blocked IP is logged" troubleshooting tip.