Use seelog instead of the default log pkg
This commit is contained in:
parent
725b1d8951
commit
bbbd35e928
6 changed files with 34 additions and 22 deletions
5
admin.go
5
admin.go
|
@ -1,9 +1,10 @@
|
|||
package main
|
||||
|
||||
import log "github.com/cihub/seelog"
|
||||
|
||||
import (
|
||||
"github.com/gorilla/mux"
|
||||
"labix.org/v2/mgo/bson"
|
||||
"log"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
@ -224,7 +225,7 @@ func storeHandler(h handler) {
|
|||
book := books[0]
|
||||
if err != nil {
|
||||
h.sess.Notify("An error ocurred!", err.Error(), "error")
|
||||
log.Println("Error storing book '", book.Title, "': ", err.Error())
|
||||
log.Error("Error storing book '", book.Title, "': ", err.Error())
|
||||
continue
|
||||
}
|
||||
h.db.UpdateBook(id, bson.M{"active": true})
|
||||
|
|
Reference in a new issue