grafeas / voucher

🎟 Voucher creates attestations for Binary Authorization
Apache License 2.0
73 stars 20 forks source link

logging: url as string #59

Closed thepwagner closed 2 years ago

thepwagner commented 2 years ago

When logging requests, output the URL as a string instead of struct. This avoids outputting a bunch of uninteresting and empty fields. The same information is logged, just more compact. This is very much a paper-cut.

Pre:

{"form":{},"level":"info","msg":"received request","path":"/diy/verify","time":"2022-01-10T16:06:46Z","url":{"Scheme":"","Opaque":"","User":null,"Host":"","Path":"/diy/verify","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":"","RawFragment":""}}

Post:

{"form":{},"level":"info","msg":"received request","path":"/diy/verify","time":"2022-01-10T16:06:46Z","url": "/diy/verify"}