Skip to content

Use stderr for logging in prod #1319

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

Merged
merged 1 commit into from
Feb 21, 2022
Merged

Use stderr for logging in prod #1319

merged 1 commit into from
Feb 21, 2022

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Feb 20, 2022

Using stderr in prod by default is a good idea (we made the change in the official recipe a while ago -- https://github.com/symfony/recipes/blob/master/symfony/monolog-bundle/3.7/config/packages/monolog.yaml#L51) as it makes it work out of the box with anything compatible with Docker, including Platform.sh.

Using stderr in prod by default is a good idea (we made the change in the official recipe a while ago -- https://github.com/symfony/recipes/blob/master/symfony/monolog-bundle/3.7/config/packages/monolog.yaml#L51) as it makes it work out of the box with anything compatible with Docker, including Platform.sh.
@@ -8,7 +8,7 @@ monolog:
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
path: php://stderr
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to wrap the value with quotes? Probably double colon on the same line may cause problems

Copy link
Member Author

Choose a reason for hiding this comment

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

No need, this is valid YAML.

@javiereguiluz
Copy link
Member

Thanks Fabien.

@javiereguiluz javiereguiluz merged commit 5149204 into main Feb 21, 2022
@javiereguiluz javiereguiluz deleted the fabpot-patch-1 branch February 21, 2022 08:54
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