1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07:02 +00:00

Replace pkg/log with zerolog for normal logging #90

This commit is contained in:
James Hillyerd
2018-03-25 21:57:23 -07:00
parent 64ecd810b4
commit e2ba10c8ca
13 changed files with 177 additions and 153 deletions

View File

@@ -8,7 +8,7 @@ import (
"strings"
"time"
"github.com/jhillyerd/inbucket/pkg/log"
"github.com/rs/zerolog/log"
)
// TemplateFuncs declares functions made available to all templates (including partials)
@@ -42,7 +42,8 @@ func Reverse(name string, things ...interface{}) string {
// Grab the route
u, err := Router.Get(name).URL(strs...)
if err != nil {
log.Errorf("Failed to reverse route: %v", err)
log.Error().Str("module", "web").Str("name", name).Err(err).
Msg("Failed to reverse route")
return "/ROUTE-ERROR"
}
return u.Path