This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Allow custom ignored namespaces in backtrace processor #83
Merged
michalbundyra
merged 5 commits into
zendframework:develop
from
adam-ja:custom-backtrace-ignore
Aug 23, 2019
Merged
Allow custom ignored namespaces in backtrace processor #83
michalbundyra
merged 5 commits into
zendframework:develop
from
adam-ja:custom-backtrace-ignore
Aug 23, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adam-ja
force-pushed
the
custom-backtrace-ignore
branch
from
January 17, 2018 16:32
9e363be
to
fbdca4c
Compare
This looks like a great feature! Can you please also add documentation (under the Thanks! |
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 the log(). 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 the PsrLoggerAdapter wraps the underlying Zend Logger. This patch allows us to add our own custom ignored namespaces in addition to the default Zend\Log.
adam-ja
force-pushed
the
custom-backtrace-ignore
branch
from
April 29, 2018 15:34
6d0e5e5
to
4206b8c
Compare
Docs added - sorry for the delay. There's really nothing to say about |
Xerkus
reviewed
Sep 27, 2018
Ignored namespaces are not expected to change once a processor is created so it makes more sense to have this as a constructor option rather than a separate function that allows the processor to be reconfigured after creation.
michalbundyra
added a commit
that referenced
this pull request
Aug 23, 2019
Allow custom ignored namespaces in backtrace processor
michalbundyra
added a commit
that referenced
this pull request
Aug 23, 2019
michalbundyra
added a commit
that referenced
this pull request
Aug 23, 2019
Thanks, @adam-ja! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 areignored so that we can see the actual application code that called the
log()
.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
.