-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Use sanitized message in logs #25433
Conversation
sdk/core/azure-core/src/main/java/com/azure/core/util/logging/LoggingUtils.java
Outdated
Show resolved
Hide resolved
sdk/core/azure-core/src/main/java/com/azure/core/util/logging/LoggingUtils.java
Outdated
Show resolved
Hide resolved
sdk/core/azure-core/src/main/java/com/azure/core/util/logging/ClientLogger.java
Show resolved
Hide resolved
sdk/core/azure-core/src/main/java/com/azure/core/implementation/logging/LoggingUtils.java
Outdated
Show resolved
Hide resolved
sdk/core/azure-core/src/main/java/com/azure/core/implementation/logging/LoggingUtils.java
Outdated
Show resolved
Hide resolved
sdk/core/azure-core/src/main/java/com/azure/core/implementation/logging/LoggingUtils.java
Outdated
Show resolved
Hide resolved
sdk/core/azure-core/src/main/java/com/azure/core/implementation/logging/LoggingUtils.java
Outdated
Show resolved
Hide resolved
sdk/core/azure-core/src/main/java/com/azure/core/implementation/logging/LoggingUtils.java
Outdated
Show resolved
Hide resolved
…n/logging/LoggingUtils.java Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com>
sdk/core/azure-core/src/main/java/com/azure/core/implementation/logging/LoggingUtils.java
Outdated
Show resolved
Hide resolved
|
||
@Test | ||
public void withCL() { | ||
assertEquals("\thelloworld", LoggingUtils.sanitizeLogMessageInput("\r\thello\r" + NEW_LINE + "world")); |
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.
I wonder if the expected value should be "t\hello world". i.e. should we replace \n or \r or \r\n with white space?
If somebody is processing logs in some sophisticated way (i.e. attempts to do NLP) "helloworld" and "hello world" may make a difference.
(this might be out of scope of this PR).
46db7f1
to
8cda5c6
Compare
spin-off from #25247
This PR
Benchmark