Skip to content

Conversation

@kpumuk
Copy link
Contributor

@kpumuk kpumuk commented Dec 22, 2025

Currently, production environment logs spit out debug logs, and there is no way to configure it without rebuilding the docker container. This poses both performance and security implications.

By default, Rails generates production environment config with RAILS_LOG_LEVEL environment variable, but a sequence of changes for the SaaS version led to removal of this:

  • 482aa90 switches log level to unconfigurable fatal, to enable structured logging
  • fa9ee03 moves structured logging out of self-hosted version to SaaS
  • 28250b3 moves fatal (and the last mention of log_level) from production to SaaS production, switching self-hosted version to debug

This pull request restores "info" by default, and add configurability. SaaS version overrides it with "fatal", so no changes needed there: https://github.com/basecamp/fizzy/blob/main/saas/config/environments/production.rb#L4-L6

Copy link
Member

@jorgemanrubia jorgemanrubia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@flavorjones do you agree?

Copy link
Member

@flavorjones flavorjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right on.

@flavorjones
Copy link
Member

flavorjones commented Jan 7, 2026

Hmm, looks like the saas/config/environments/development.rb configuration is being loaded before config/environments/development.rb ... Let me see if that's also true for the produciton files, and also if I can fix it up.

@flavorjones
Copy link
Member

I've pushed cd66cb0 onto this branch which moves the SaaS setting into an environment variable. Will test this out on beta really quickly and if it works, I'll merge.

@flavorjones
Copy link
Member

Looks good on beta. @kpumuk thanks for the pull request!

@flavorjones flavorjones merged commit 88ab62c into basecamp:main Jan 7, 2026
5 checks passed
@kpumuk kpumuk deleted the log-level branch January 7, 2026 17:01
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.

3 participants