-
Notifications
You must be signed in to change notification settings - Fork 2
ETU-65064: Adds support for log prefix #250
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,13 +16,15 @@ | |||||||
|
|
||||||||
| public class MessageComposer { | ||||||||
|
|
||||||||
| protected String prefix; | ||||||||
| protected boolean scheme; | ||||||||
| protected boolean host; | ||||||||
| protected boolean port; | ||||||||
| protected boolean path; | ||||||||
| protected boolean query; | ||||||||
|
|
||||||||
| public MessageComposer(boolean scheme, boolean host, boolean port, boolean path, boolean query) { | ||||||||
| public MessageComposer(String prefix, boolean scheme, boolean host, boolean port, boolean path, boolean query) { | ||||||||
| this.prefix = prefix; | ||||||||
| this.scheme = scheme; | ||||||||
| this.host = host; | ||||||||
| this.port = port; | ||||||||
|
|
@@ -36,6 +38,9 @@ static boolean isNotStandardPort(final String scheme, final int port) { | |||||||
| } | ||||||||
|
|
||||||||
| protected void constructMessage(HttpRequest request, StringBuilder messageBuilder) throws IOException { | ||||||||
| if (prefix != null) { | ||||||||
| messageBuilder.append(prefix); | ||||||||
|
||||||||
| messageBuilder.append(prefix); | |
| messageBuilder.append(prefix); | |
| messageBuilder.append(' '); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a new parameter at the beginning of the constructor changes the constructor signature and is a breaking change for any code that directly instantiates
MessageComposer. While the internal usage has been updated inMessageFormatProperties.toComposer(), external consumers who directly instantiate this class will be broken.Consider either:
MessageComposer(boolean scheme, boolean host, boolean port, boolean path, boolean query, String prefix)