log level changes
This commit is contained in:
@@ -67,7 +67,7 @@ func (q *Queue) Process() {
|
||||
return
|
||||
}
|
||||
if dequeue := q.try(itemkey, maxRetries); dequeue {
|
||||
q.log.Debug("email %q has been delivered", id)
|
||||
q.log.Info("email %q has been delivered", id)
|
||||
err = q.Remove(id)
|
||||
if err != nil {
|
||||
q.log.Error("cannot dequeue email %q: %v", id, err)
|
||||
|
||||
@@ -85,11 +85,11 @@ func (q *Queue) try(itemkey string, maxRetries int) bool {
|
||||
|
||||
err = q.sendmail(item["from"], item["to"], item["data"])
|
||||
if err == nil {
|
||||
q.log.Debug("email %q from queue was delivered")
|
||||
q.log.Info("email %q from queue was delivered")
|
||||
return true
|
||||
}
|
||||
|
||||
q.log.Debug("attempted to deliver email id=%q, retry=%q, but it's not ready yet: %v", item["id"], item["attempts"], err)
|
||||
q.log.Info("attempted to deliver email id=%q, retry=%q, but it's not ready yet: %v", item["id"], item["attempts"], err)
|
||||
attempts++
|
||||
item["attempts"] = strconv.Itoa(attempts)
|
||||
err = q.lp.SetAccountData(itemkey, item)
|
||||
|
||||
Reference in New Issue
Block a user