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

Suppress tusd logs #3552

Merged
merged 2 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/suppress-tusd-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Suppress tusd logs

`tusd` package would log specific messages regardless of loglevel. This is now changed

https://github.com/cs3org/reva/pull/3552
2 changes: 2 additions & 0 deletions pkg/rhttp/datatx/manager/tus/tus.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package tus

import (
"context"
"log"
"net/http"
"path"
"path/filepath"
Expand Down Expand Up @@ -99,6 +100,7 @@ func (m *manager) Handler(fs storage.FS) (http.Handler, error) {
config := tusd.Config{
StoreComposer: composer,
NotifyCompleteUploads: true,
Logger: log.New(appctx.GetLogger(context.Background()), "", 0),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, now that the discussion is on, let me throw in my 2 cents. Can we pass in the active context instead of creating it on the fly because the active context holds the requestID.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no active context. This happens on service init

}

handler, err := tusd.NewUnroutedHandler(config)
Expand Down