Skip to content

fix(dev-server): pass request log suppression via fastify logController - #1513

Merged
dannyhw merged 1 commit into
mainfrom
fix/dev-server-fstdep023
Oct 22, 2026
Merged

dannyhw merged 1 commit into
mainfrom
fix/dev-server-fstdep023

Conversation

@dannyhw

@dannyhw dannyhw commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Every dev server start prints:

[FSTDEP023] FastifyDeprecation: disableRequestLogging option is deprecated. Use the logController option with disableRequestLogging or isLogDisabled override instead. The disableRequestLogging top-level option will be removed in `fastify@6`.

Fastify warns whenever options.disableRequestLogging !== undefined, and the dev server always passes a boolean derived from logRequests, so it fired for everyone.

This passes the same value through a LogController instance instead:

logController: new LogController({
  disableRequestLogging: options.disableRequestLogging,
}),
  • Fastify only accepts a LogController instance for logController (anything else throws FST_ERR_LOG_INVALID_LOG_CONTROLLER), and LogController is exported from fastify with types.
  • LogController only gates per-request log lines (incoming, completed, request errors). It does not create or configure the logger, so the existing logger: { level, stream } pipeline into the console reporter and the API websocket is unchanged.
  • Public options are unchanged: logRequests keeps the same semantics (default suppressed, logRequests: true / --log-requests emitted).
  • forceCloseConnections: true is untouched.

Test plan

  • Fastify({ disableRequestLogging: false }) prints FSTDEP023; Fastify({ logController: new LogController({ disableRequestLogging: false }) }) does not.
  • Built dist started directly, GET /status sent, captured delegate.logger.onMessage and wss.apiServer.send:
    • main: FSTDEP023 in both modes
    • this branch: no warning; default → only Server listening; logRequests: true → Server listening, incoming request, request completed, on both channels, identical to main
  • super-app-showcase packages/auth with this build (--port 9011): no FSTDEP023; GET /status logged only with --log-requests
  • typecheck, build, biome

No dev-server test suite exists, so verification was manual.

Fastify 5.12 deprecates the top-level disableRequestLogging option
(FSTDEP023). The dev server always passed a concrete boolean derived from
logRequests, so the warning printed on every start. Pass it through a
LogController instance instead; the logger stream is unchanged.
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
repack-website Ready Ready Preview Oct 22, 2026 5:00pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2bd48c7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@callstack/repack-dev-server Patch
@callstack/repack Patch
@callstack/repack-plugin-expo-modules Patch
@callstack/repack-plugin-nativewind Patch
@callstack/repack-plugin-reanimated Patch
@callstack/repack-init Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dannyhw
dannyhw merged commit e0b86ba into main Oct 22, 2026
10 checks passed
@dannyhw
dannyhw deleted the fix/dev-server-fstdep023 branch October 22, 2026 17:17

This branch was successfully deployed

1 active deployment
Preview — 2bd48c7e Deployed Oct 22, 2026 by vercel[bot]
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