Jordi Boggiano
Jordi Boggiano
I guess this could be a configurable flag on LogstashFormatter so one can enable ECS support, and maybe a deprecation warning if not enabled so people are nudged to migrate...
In any case PR welcome, I don't have access to an ECS stack so rather have someone knowledgeable do this.
Yeah you should just return a formatted string or array or something instead of modifying the log record. You can use $record->toArray() to get a monolog-v2 style array out of...
There is a 64K limit (DATAGRAM_MAX_LENGTH). I'm not sure what you can do here, except use another format or log less data.
Yes.. you need to port the code to work with Monolog 3, see https://github.com/Seldaek/monolog/blob/main/UPGRADE.md
The Enum gives you a clear list of all possible values, and indeed it makes it impossible to add new ones, which was always a bad idea IMO. Not sure...
You mean Level::from($var)? Have you looked how enum work in php? See https://www.php.net/manual/en/language.enumerations.backed.php
Level instances also have convenient ways to get other standard level types from them this is something you couldn't do with constants https://github.com/Seldaek/monolog/blob/main/src/Monolog/Level.php#L150-L187
OK I see that glob has no support for stream wrappers, that sucks. We'd need to convert glob + getGlobPattern into something like: ``` $baseDir = $this->computeBaseDir($this->filename); $directory = new...
This isn't a monolog issue, but a dependency issue. Somehow you must have an outdated psr/log loaded somewhere. You gotta figure out why that is.