aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/data
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2018-11-01 22:27:42 +0100
committerBjørn Erik Pedersen <[email protected]>2018-11-03 12:06:23 +0100
commit4b7d3e57a40214a1269eda59731aa22a8f4463dd (patch)
tree0b258d8dc0c022081a03deac706a84c9dd4e90db /tpl/data
parent4f3c0959635776278f5cc6ab7e5e262fdd3e1219 (diff)
downloadhugo-4b7d3e57a40214a1269eda59731aa22a8f4463dd.tar.gz
hugo-4b7d3e57a40214a1269eda59731aa22a8f4463dd.zip
Make WARN the new default log log level
This commit also pulls down the log level for a set of WARN statements to INFO. There should be no ERRORs or WARNINGs in a regular Hugo build. That is the story about the Boy Who Cried Wolf. Since the WARN log is now more visible, this commit also improves on some of them, most notable the "layout not found", which now would look something like this: ```bash WARN 2018/11/02 09:02:18 Found no layout for "home", language "en", output format "CSS": create a template below /layouts with one of these filenames: index.en.css.css, home.en.css.css, list.en.css.css, index.css.css, home.css.css, list.css.css, index.en.css, home.en.css, list.en.css, index.css, home.css, list.css, _default/index.en.css.css, _default/home.en.css.css, _default/list.en.css.css, _default/index.css.css, _default/home.css.css, _default/list.css.css, _default/index.en.css, _default/home.en.css, _default/list.en.css, _default/index.css, _default/home.css, _default/list.css ``` Fixes #5203
Diffstat (limited to 'tpl/data')
-rw-r--r--tpl/data/data.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tpl/data/data.go b/tpl/data/data.go
index 8b3eb8292..cecce4b45 100644
--- a/tpl/data/data.go
+++ b/tpl/data/data.go
@@ -50,7 +50,7 @@ func (ns *Namespace) GetCSV(sep string, urlParts ...string) (d [][]string, err e
url := strings.Join(urlParts, "")
var clearCacheSleep = func(i int, u string) {
- ns.deps.Log.WARN.Printf("Retry #%d for %s and sleeping for %s", i, url, resSleep)
+ ns.deps.Log.INFO.Printf("Retry #%d for %s and sleeping for %s", i, url, resSleep)
time.Sleep(resSleep)
deleteCache(url, ns.deps.Fs.Source, ns.deps.Cfg)
}
@@ -109,8 +109,8 @@ func (ns *Namespace) GetJSON(urlParts ...string) (v interface{}, err error) {
}
err = json.Unmarshal(c, &v)
if err != nil {
- ns.deps.Log.WARN.Printf("Cannot read JSON from resource %s: %s", url, err)
- ns.deps.Log.WARN.Printf("Retry #%d for %s and sleeping for %s", i, url, resSleep)
+ ns.deps.Log.INFO.Printf("Cannot read JSON from resource %s: %s", url, err)
+ ns.deps.Log.INFO.Printf("Retry #%d for %s and sleeping for %s", i, url, resSleep)
time.Sleep(resSleep)
deleteCache(url, ns.deps.Fs.Source, ns.deps.Cfg)
continue