imds-credential-server icon indicating copy to clipboard operation
imds-credential-server copied to clipboard

log all errors, add debug-flag

Open avoidik opened this issue 2 years ago • 2 comments

hello,

with this change I would like to propose the following:

  • log all errors to console, so that we will be able to see all errors not just 2
  • add debug-flag, to be able to snoop into the headers and raw responses
  • minor change in the command-line parameters processing code (pointers to variables)
  • get rid of fmt

avoidik avatar Aug 14 '23 08:08 avoidik

I would like to continue to use fmt for all program usage errors and the version command, but the switch to log for printing identity does make sense.

Why do you want to change the parameter variable style?

benkehoe avatar Aug 14 '23 19:08 benkehoe

Let's make the "log all errors" when debug is set but keep the existing "only log internal errors" when it's not set. The point is, e.g., 404s don't need to be logged, only unexpected problems from the code.

benkehoe avatar Aug 14 '23 19:08 benkehoe