1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

More metrics, better logging

This commit is contained in:
James Hillyerd
2012-10-24 12:40:17 -07:00
parent 606fb124a6
commit 81bb394755
6 changed files with 85 additions and 34 deletions

View File

@@ -1,6 +1,7 @@
package web
import (
"fmt"
"github.com/jhillyerd/inbucket/log"
"html/template"
"io"
@@ -31,11 +32,11 @@ func MailboxList(w http.ResponseWriter, req *http.Request, ctx *Context) (err er
mb, err := ctx.DataStore.MailboxFor(name)
if err != nil {
return err
return fmt.Errorf("Failed to get mailbox for %v: %v", name, err)
}
messages, err := mb.GetMessages()
if err != nil {
return err
return fmt.Errorf("Failed to get messages for %v: %v", name, err)
}
log.Trace("Got %v messsages", len(messages))