Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not show debug messages in prod #430

Merged
merged 2 commits into from
Jan 14, 2024
Merged

Do not show debug messages in prod #430

merged 2 commits into from
Jan 14, 2024

Conversation

melroy89
Copy link
Member

@melroy89 melroy89 commented Jan 14, 2024

In production I do not want to see debug messages, the whole point of production is to minimize logging pollution and disk I/O towards log file(s). Only show error messages.

Ps. I tried to set it to info, but that didn't work either, but setting the log level to warning solved the problem.

melroy89 referenced this pull request Jan 14, 2024
I thought someone already hooked the app log to docker logs but
apparently not so here goes:

- mount the log directory within `php`, `messenger` and `messenger_ap`
  services to host `storage/logs` directory for easier access and more
  persistent log storage, so it doesn't get washed away when recreating
  containers while trying to debug something
- adjust logging to also send logs to stderr, which will be output to
  docker logs, and can be viewed using `docker logs`, `docker compose
  logs` and the like
  for bare metal setups, this stderr log should already be discarded
  by php-fpm (see php-fpm option `catch_workers_output`)
- add extra instructions and mentions in the docker guide about logging,
  as introduced by this change
@melroy89 melroy89 merged commit a10a931 into main Jan 14, 2024
7 checks passed
@melroy89 melroy89 deleted the move_monolog_to_error branch January 14, 2024 15:34
@melroy89 melroy89 added the backend Backend related issues and pull requests label Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants