How to config symfony to log deprecations?

  deprecation-warning, php, symfony

I’d like to upgrade from Symfony 4.4. to 5.0. So I have to check for deprecations in the code. The symfony migration guide says I have to use the web dev toolbar, but in my API-app there is no frontend for the tool-bar.

How can I configure symfony/monolog to log deprecation warnings to the log file?

Source: Symfony Questions