tapir
tapir copied to clipboard
docs: add some example of custom ServerLog
Hey folks! First of all thanks for wonderful library.
I've created this PR because it wasn't obviously clear to me how to log decoding errors, I spent couple of hours playing with DefaultServerLog and wondering why nothing is being logged, then I had this "aha" moment when I understood what's going on.
I think scaladoc which I added about doLogAllDecodeFailures should be enough explanation for future users as I realize that changing behavior of DefaultSerLog might break somebodys workflow. Also, I provided an example how custom ServerLog can look like.
What do you think?
Thanks! However, instead of adding a "Beware, do not use" comment, I think it's better to fix the underlying implementation. Do I understand correctly that the name logAllDecodeFailures is misleading? Maybe simple renaming this (and the do... method) to logNotHandledDecodeFailures would be sufficient?
Maybe do not use is too strong ;) Use with caution sounds better, doesn't it?
I was thinking about renaming it, but will this be binary compatible change?
It won't, but only core needs to hold bin-compat. server is still in "stabilising"
Closing old PRs