diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-10-21 11:17:48 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-10-22 09:09:29 +0200 |
commit | fdfa4a5fe62232f65f1dd8d6fe0c500374228788 (patch) | |
tree | b804e91506a7f3c58690c6fd774b28f95184d5dc /hugolib/alias.go | |
parent | 8cbe2bbfad6aa4de267921e24e166d4addf47040 (diff) |
Allow getJSON errors to be ignored
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).
Fixes #7866
Diffstat (limited to 'hugolib/alias.go')
-rw-r--r-- | hugolib/alias.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hugolib/alias.go b/hugolib/alias.go index c1f668d41..6272b7910 100644 --- a/hugolib/alias.go +++ b/hugolib/alias.go @@ -33,11 +33,11 @@ import ( type aliasHandler struct { t tpl.TemplateHandler - log *loggers.Logger + log loggers.Logger allowRoot bool } -func newAliasHandler(t tpl.TemplateHandler, l *loggers.Logger, allowRoot bool) aliasHandler { +func newAliasHandler(t tpl.TemplateHandler, l loggers.Logger, allowRoot bool) aliasHandler { return aliasHandler{t, l, allowRoot} } @@ -80,7 +80,7 @@ func (s *Site) writeDestAlias(path, permalink string, outputFormat output.Format func (s *Site) publishDestAlias(allowRoot bool, path, permalink string, outputFormat output.Format, p page.Page) (err error) { handler := newAliasHandler(s.Tmpl(), s.Log, allowRoot) - s.Log.DEBUG.Println("creating alias:", path, "redirecting to", permalink) + s.Log.Debug().Println("creating alias:", path, "redirecting to", permalink) targetPath, err := handler.targetPathAlias(path) if err != nil { @@ -153,12 +153,12 @@ func (a aliasHandler) targetPathAlias(src string) (string, error) { if len(msgs) > 0 { if runtime.GOOS == "windows" { for _, m := range msgs { - a.log.ERROR.Println(m) + a.log.Errorln(m) } return "", fmt.Errorf("cannot create \"%s\": Windows filename restriction", originalAlias) } for _, m := range msgs { - a.log.INFO.Println(m) + a.log.Infoln(m) } } |