Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KPrintfMessageParser & KDefaultPrintfMessageParser #13

Merged
merged 11 commits into from
Aug 8, 2023

Conversation

buenaflor
Copy link
Owner

@buenaflor buenaflor commented Aug 2, 2023

In this PR I tried my best not to touch the Java Flogger code but I couldn't find any other way to solve the following issue:

PrintfMessageParser contains the function abstract int parsePrintfTerm which I cannot override in Kotlin modules because the Java visibility is package-private. So the only solution I found was to increase the visibility to protected.

@MarkCMann

@@ -79,7 +79,7 @@ static String getSafeSystemNewline() {
* @param formatStart the index of the (first) format character in the term.
* @return the index after the last character of the term.
*/
abstract int parsePrintfTerm(
protected abstract int parsePrintfTerm(
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small change to the Java Flogger codebase

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense. In an ideal world it would make sense to make this internal so that this is only accessible to friend modules.

@@ -79,7 +79,7 @@ static String getSafeSystemNewline() {
* @param formatStart the index of the (first) format character in the term.
* @return the index after the last character of the term.
*/
abstract int parsePrintfTerm(
protected abstract int parsePrintfTerm(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense. In an ideal world it would make sense to make this internal so that this is only accessible to friend modules.

@buenaflor buenaflor merged commit c105971 into main Aug 8, 2023
3 checks passed
@buenaflor buenaflor deleted the feat/printfmessageparser branch August 8, 2023 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants