Skip to content

Conversation

athifsha
Copy link

@athifsha athifsha commented Oct 6, 2025

This PR adds support for disabling Caddy access logs when running Laravel Octane with FrankenPHP.

Problem:
Caddy logs every request by default, creating unnecessary noise in production logs where centralized logging (Grafana, NewRelic, etc.) is already used.

Solution:
Added an environment variable OCTANE_FRANKENPHP_DISABLE_ACCESS_LOGS that, when set to true, disables the access logs by commenting out the log {} block in the generated Caddyfile.

Behavior:

Default: logs enabled (backward-compatible).

When OCTANE_FRANKENPHP_DISABLE_ACCESS_LOGS=true, access logs are disabled.

Testing:
Verified locally with Octane + FrankenPHP; access logs were correctly suppressed when the env was set.

Changelog:
Added OCTANE_FRANKENPHP_DISABLE_ACCESS_LOGS environment variable to disable Caddy access logs.

Athif added 2 commits October 7, 2025 01:31
… generation in FrankenPHP’s Caddyfile. Default remains enabled.
@taylorotwell
Copy link
Member

Just change it in your Caddyfile.

@athifsha
Copy link
Author

athifsha commented Oct 6, 2025

Got it 👍 makes sense — I’ll move the access log disable logic to our own Caddyfile instead. Thanks for the clarification!

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.

2 participants