tus / tusd

Reference server implementation in Go of tus: the open protocol for resumable file uploads
https://tus.github.io/tusd
MIT License
2.92k stars 465 forks source link

Duplicate id printing in log #1146

Closed luckycatx closed 1 week ago

luckycatx commented 1 week ago

In "unrouted_handler.go", line 399

c.log = c.log.With("id", id)
c.log.Info("UploadCreated", "id", id, "size", size, "url", url)

should be

c.log.Info("UploadCreated", "size", size, "url", url)

Since it causes multiple "id" field printing:

2024/06/19 23:32:25 INFO RequestIncoming method=POST path="" requestId=""
-> 2024/06/19 23:32:25 INFO UploadCreated method=POST path="" requestId="" id=2251bae50c7bccf568d7399fbe7bd7e2 id=2251bae50c7bccf568d7399fbe7bd7e2 size=0 url=http://localhost:8080/files/2251bae50c7bccf568d7399fbe7bd7e2
2024/06/19 23:32:25 INFO ResponseOutgoing method=POST path="" requestId="" id=2251bae50c7bccf568d7399fbe7bd7e2 status=201 body=""
Acconut commented 1 week ago

Thank you for reporting this and the fix!