Hide task request body by default
What does this MR do and why?
I've realized that TaskRequest logging message is going to expose credentials when we start using tasks API (!143 (merged) and gitlab!145796 (merged))
This MR hides it unless the DEBUG env variable is set.
How to set up and validate locally
- Ensure that you have
GDK_DIRset up (https://gitlab.com/gitlab-org/gitlab-zoekt-indexer#running-indexer-in-gdk-mode) - Execute
make gdk - Ensure that you see the response body. For example,
2024/02/28 17:26:07 [DEBUG] TaskRequest [200] Body: {"id":21} - Execute
export DEBUG=trueand runmake gdkagain - This time you shouldn't see the response body
2024/02/28 17:29:20 [INFO] TaskRequest [200]
Numbered steps to set up and validate the change are strongly suggested.
Edited by Dmitry Gruzd