Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging: url as string #59

Merged
merged 1 commit into from
Jan 12, 2022
Merged

logging: url as string #59

merged 1 commit into from
Jan 12, 2022

Conversation

thepwagner
Copy link
Collaborator

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"}

@thepwagner thepwagner self-assigned this Jan 10, 2022
@thepwagner thepwagner merged commit 412fb36 into main Jan 12, 2022
@thepwagner thepwagner deleted the url-logging branch January 12, 2022 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants