Closed adam-ja closed 5 years ago
This looks like a great feature!
Can you please also add documentation (under the doc/book/
tree) detailing the new methods and options?
Thanks!
Docs added - sorry for the delay.
There's really nothing to say about getIgnoredNamespaces()
as there's probably not a great deal of use for it beyond testing/debugging.
Thanks, @adam-ja!
The backtrace processor adds the file, line, class, and function responsible for triggering a log to the event extras.
By default, classes in the backtrace under the
Zend\Log
namespace are ignored so that we can see the actual application code that called thelog()
.However, there might also be cases when we want to ignore other namespaces so that we get the true origin. The example I came across that prompted this patch was
Psr\Log
, which appears when thePsrLoggerAdapter
wraps the underlying Zend Logger.This patch allows us to add our own custom ignored namespaces in addition to the default
Zend\Log
.