Before Neos 5.0 the
log() method of the DefaultLogger which was used as implementation of the SystemLoggerInterface allowed to give a Package-, Class- and Method name as parameters. If non of this data was given, the defaultLogger tried to extract this data from the backtrace.
Well that was not ideal. The package name was kind of redundant with the class name and the the extraction of the class name from the backtrace somehow failed if closures where used.
Today, after the PSR change, the backtrace magic is gone and giving this parameters with every log message is really tedious as it needs now to be given within the additional data array under special keys, which is also marked as legacy in the code.
Having the code location, where the log message was issued in a separate field is always better then including this information unstructured in the log message.
In our projects we heavily rely on the full qualified class name to classify the log messages and to do drill down analysis in kibana.
Sure, I can change the implementation of the Logger class, bring the old behavior back and make classified log message more convenient.
But I wonder, if I am the only one that use that feature and If it wouldn’t be a better Idea to find a solution for that in the core.
Any feedback appreciated.