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
Refactored library completely #6
Conversation
|
Absolutely, I'd just think about having a different interface for the body (without the fake key):
vs.
|
Otherwise I have the fear that clients, without reading the docs properly, would just look at the method having a key and a value and would assume that a body obfuscator would get called for every property + value (e.g. for json). |
👍 obfuscation of the body will surely be also very different from obfuscating a header/parameter implementation-wise |
Any idea whether this is safe to use as a wallpaper? |
|
||
import javax.servlet.ServletRequest; | ||
|
||
interface Markable extends Named { |
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 don't see the need for having this as an interface with default methods instead of protected methods in OnceFilter
. Default methods are nice if a subclass might have a more optimized implementation, but here it just makes the code harder to follow.
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.
but here it just makes the code harder to follow.
I inlined most of them now (not pushed yet).
<version>1.7.12</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> |
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.
Are you using lombok just for one SneakyThrows
or did I miss any more usages?
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.
Are you using lombok just for one SneakyThrows or did I miss any more usages?
This is the only usage right here. I haven't check if it actually helps to get full coverage.
So implementations can decide where to include e.g. correlation id
lines.add(formatRequestLine(request)); | ||
lines.addAll(formatHeaders(request.getHeaders())); | ||
|
||
final String body = request.getBodyAsString(); |
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.
Would it make sense to extract lines 45-51 as they're equal to 66-72?
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.
👍
This should make it clear we are testing two things now
Refactored library completely
I renamed the project to Logbook in the process. Still missing: