Make MdcJsonProvider.writeMdcEntry() protected #973
Closed
+1
−1
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.
Follow up of #957 to make the writeMdcEntry() method protected.
In my former proposal the intention for the
protectedon the method in question was to allow an easier way to write a custom extension by extending fromMdcJsonProviderand only overwriting what one wants to override.Though there's no obligation to do so for a custom handler, it would be nicer as it already provides useful functions that a custom
MdcJsonProviderwould need as well.A dependency is there regardless if the methods are
privateorprotected. However, opening up some of the (private) methods would make customer handlers easier as some of the inner framework methods are very hard to reach otherwise.Having it
privatewould enforce to copy a redundant version of some of the inner workings. Though from the perspective of the framework, the inner workings are often black-boxed. But from the perspective of a client writing a custom handler it's more cumbersome to rewrite part of the code to fulfill a similar or exact purpose.