Skip to content

Commit

Permalink
fix a performance bug caused by requestlogger
Browse files Browse the repository at this point in the history
Signed-off-by: Toby Yan <me@tobyan.com>
  • Loading branch information
toby1991 committed Jul 20, 2019
1 parent 8876d1a commit 414236f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/logics/mindav/driver/miniofs/webdav_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func (mo file) Stat() (os.FileInfo, error) {
func (mo file) ReadFrom(r io.Reader) (n int64, err error) {
n, err = mo.m.client.PutObject(mo.m.bucketName, strings.TrimPrefix(mo.name, "/"), r, -1, minio.PutObjectOptions{ContentType: "application/octet-stream"})
if err != nil {

return 0, log.Error(err, toto.V{"op": "ReadFrom", "name": mo.name})
}
fmt.Println("Successfully uploaded bytes: ", n)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func httpServe(ctx context.Context) {
sentry.Use(r.GinEngine(), false)

if c.GetBool("app.debug") {
r.Use(middleware.RequestLogger())
//r.Use(middleware.RequestLogger())
}

r.RedirectTrailingSlash = false
Expand Down

0 comments on commit 414236f

Please sign in to comment.