[PATCH] D90526: [clangd] Add -log=public to redact all request info from index server logs

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 2 01:31:31 PST 2020


sammccall added a comment.

In D90526#2367659 <https://reviews.llvm.org/D90526#2367659>, @kadircet wrote:

> Thanks for figuring this one out!
>
> I think the final result looks pretty good, I especially loved only disabling when there's a request in question.
> My only hesitation is around logging all severities when we are outside a request, I suppose it shouldn't cause too much trouble but we sometimes end up logging too much in verbose mode and I am afraid of this hindering the server performance at random intervals (e.g. when it loads a new index). But this is just speculation. I suppose we can think about this when it happens. Also maybe we should not be logging that much instead :D

So I can't remember anymore why I put this as an enum `-log=public` rather than an independent switch `-log-public` or so that could combine with any log level.
Sounds like the latter would be better?

> In addition to that it could be nice to see how the `public` tagging will happen. Are you planning to have a custom endpoint for it, or should the user manually insert it into format string? Both are fine by me, the latter might even make it less error-prone for accidental logging at the cost of misspells and spreading the string across the codebase.

Manually insert it into the format string. After thinking about it I came to the conclusion there just aren't that many places where we need to log things publicly. I expect to basically not have any visibility inside most requests except the error patterns.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90526/new/

https://reviews.llvm.org/D90526



More information about the cfe-commits mailing list