diff options
author | Valery Piashchynski <[email protected]> | 2020-11-16 14:21:35 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-16 14:21:35 +0300 |
commit | 57ad958acab2d108be0a35547faf6e7a791cf069 (patch) | |
tree | 3c519708540265a7e74b03d1fe17ef4101ffcfdf /plugins/http/uploads.go | |
parent | d890eee1742dc3a0a1c787f7e65d40b1e81a94db (diff) |
Update Pool
Diffstat (limited to 'plugins/http/uploads.go')
-rw-r--r-- | plugins/http/uploads.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/http/uploads.go b/plugins/http/uploads.go index 99427b69..2a1524ef 100644 --- a/plugins/http/uploads.go +++ b/plugins/http/uploads.go @@ -1,8 +1,6 @@ package http import ( - "fmt" - json "github.com/json-iterator/go" "github.com/spiral/roadrunner/v2/interfaces/log" @@ -58,7 +56,7 @@ func (u *Uploads) Open(log log.Logger) { defer wg.Done() err := f.Open(u.cfg) if err != nil && log != nil { - log.Error(fmt.Errorf("error opening the file: error %v", err)) + log.Error("error opening the file", "err", err) } }(f) } @@ -67,12 +65,12 @@ func (u *Uploads) Open(log log.Logger) { } // Clear deletes all temporary files. -func (u *Uploads) Clear(log *logrus.Logger) { +func (u *Uploads) Clear(log log.Logger) { for _, f := range u.list { if f.TempFilename != "" && exists(f.TempFilename) { err := os.Remove(f.TempFilename) if err != nil && log != nil { - log.Error(fmt.Errorf("error removing the file: error %v", err)) + log.Error("error removing the file", "err", err) } } } |