Home > Blockchain >  How do I set the format of log timestamp within Monolog on Symfony framework
How do I set the format of log timestamp within Monolog on Symfony framework

Time:10-25

I will premise this with the fact that I am new to Symfony but have been using Laravel for some years.

Is it possible to change the format of the log timestamp string through configuration in Symfony (I'm sure it is). I am getting log files out that look like this…

[2022-10-18T09:11:04.228289 00:00] app.DEBUG: a message [] []

I would like to format them like this…

[2022-10-18 09:11:04] app.DEBUG: a message [] []

I am not sure if this is the relevant setting, I suspect it is part of it, but this is the LineFormatter class within Monolog

class LineFormatter extends NormalizerFormatter
{
    public const SIMPLE_FORMAT = "[           
  • Related