Home > Mobile >  Show container deprecation log in human-readable format?
Show container deprecation log in human-readable format?

Time:12-08

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:

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.

CodePudding user response:

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.

  • Related