Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Show container deprecation log in human-readable format?

I have a Symfony 5.3 application. When the container is compiled, the following file appears:

var/cache/dev/App_KernelDevDebugContainerDeprecations.log

In contains a serialized list of deprecation messages:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

a:13:{i:0;a:6:{s:4:"type";i:16384;s:7:"message";s:166:"Since symfony/security-guard 5.3: ...

Is there a way to display this deprecation log in human-readable format? I could not find a bin/console command to do that.

Also, is the output location/format of this deprecation log configured somewhere? It does not seem to follow the monolog config that applies to the rest of the project.

>Solution :

The file you are seeing is not the deprecation log, but a serialized output that the Symfony Profiler will use to show this information on dev.

Notice that sits on the cache/build directory (var/cache), and not on the log directory (var/log).

To configure Monolog to log deprecations, use the directions you’ll find here, for example. You’ll notice that the resulting log ends up where you point it to, and the result will be a regular log file in mostly readable format.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading