You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Datadog and Docker, it is recommended to only ever print JSON (for Datadog) to the output (because the output of the main process is the output of the whole container). Datadog documents how to properly configure a Symfony application to fulfill that requirement: https://docs.datadoghq.com/logs/log_collection/php/?tab=phpmonolog
They don't mention it, but you should probably also use --quiet when running a command in production, so that only the json logs show up in the output.
There's one thing that you can't however prevent, and that is the exception rendering done by
I've proposed a PR to use an env var to disable the output #53126 I think an env var is better for this as it's environment specific (e.g. I still want to see output when running a command locally or in CI)
I would be nice to have this functionality. I haven´t figured a way how to do it and not spoil the logs. It is not only connected to Datadog, but basically any native cloud provider too.
Description
When using Datadog and Docker, it is recommended to only ever print JSON (for Datadog) to the output (because the output of the main process is the output of the whole container). Datadog documents how to properly configure a Symfony application to fulfill that requirement: https://docs.datadoghq.com/logs/log_collection/php/?tab=phpmonolog
They don't mention it, but you should probably also use
--quiet
when running a command in production, so that only the json logs show up in the output.There's one thing that you can't however prevent, and that is the exception rendering done by
symfony/src/Symfony/Component/Console/Application.php
Lines 820 to 830 in c8b962a
Because of it, what you will see on Datadog is:
Example
It might be nice to have something like
to configure this.
The text was updated successfully, but these errors were encountered: