Jaymon / endpoints

Lightweight REST api backend framework that automatically maps urls to python modules and classes
MIT License
29 stars 10 forks source link

Logging improvements #114

Closed Jaymon closed 8 months ago

Jaymon commented 3 years ago

Body doesn't have the request id:

[I] Request 0c2f934a-f9f5-4ffd-ba6f-4735488587d0 header Accept-Encoding: gzip, deflate, br
[D] BODY: {'foo': 1111}

The request id could probably be shortened to the last part, so 0c2f934a-f9f5-4ffd-ba6f-4735488587d0 would become 4735488587d0

Maybe get rid of the Request part also, so something like:

req4735488587d0

It would be great to have the full request in the summary:

Request 0c2f934a-f9f5-4ffd-ba6f-4735488587d0 response 429 UNKNOWN in 13.3 ms

Could become something like:

Request <REQUEST ID> <HTTP METHOD> <PATH> response <CODE> in <TIME>

so...

Request 4735488587d0 GET /foo/bar response 429 UNKNOWN in 13.3 ms