feat: add support to push processor to the bottom of the stack#1976
Closed
vaishnavyogesh wants to merge 1 commit into
Closed
feat: add support to push processor to the bottom of the stack#1976vaishnavyogesh wants to merge 1 commit into
vaishnavyogesh wants to merge 1 commit into
Conversation
Owner
|
IMO masking should happen in a formatter / formatter decorator, because processors can be added on the handlers themselves too, so doing it on Logger processors does not guarantee at all that you'll be called "last". Thus I disagree this needs to change sorry. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It was painful to add a processor to the bottom of the stack since we need to first pop all the processors then push it and popped processors back leading to O(N).
I believe it's just better to provide support for adding a processor to the bottom of the stack in just O(1).
Usecase: Let's say we have a processor which masks sensitive fields from the log record and it just makes sense to mask the details at the end after going through all previous processors, if we don't do it this way then the latter processors could add sensitive fields which won't be masked in that case.
Let me know any suggestions for improvements.
@Seldaek Also I believe we should dockerize the development environment, I'd like to work on the same too.