Add structured logging and better error handling
This commit is contained in:
1 parent
db4e3c9611
commit
68c7dd76f2
31 files changed
+640
-109
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package jobs
|
||||
|
||||
import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"ddc/internal/history"
|
||||
@@ -28,6 +27,6 @@ func (manager *Manager) recordHistory(job *Job, destination string, movedNames [
|
||||
MovedAt: time.Now(),
|
||||
}
|
||||
if err := manager.history.Add(entry); err != nil {
|
||||
log.Printf("could not save history: %v", err)
|
||||
job.logger().Error("could not save history", "error", err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user