Skip to content

How to use LogFormatter for sanitize #5321

Answered by ikhoon
evgeny-mordyasov asked this question in Q&A
Discussion options

You must be logged in to vote

You can see the new builder methods for the deprecated APIs in TextLogFormatterBuilder.
For example, your code can be migrated as shown below.

LogFormatter logFormatter =
 LogFormatter
  .builderForText()
  .requestHeadersSanitizer(...)
  .requestContentSanitizer(...)
  ...
  .build();

LoggingService
  .builder()
  .requestLogLevel(LogLevel.INFO)
  .successfulResponseLogLevel(LogLevel.INFO)
  .failureResponseLogLevel(LogLevel.WARN)
  .logFormatter(logFormatter)
  .newDecorator();

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ikhoon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants