summaryrefslogtreecommitdiffstats
path: root/hugolib/page.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-01 22:27:42 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-11-03 12:06:23 +0100
commit4b7d3e57a40214a1269eda59731aa22a8f4463dd (patch)
tree0b258d8dc0c022081a03deac706a84c9dd4e90db /hugolib/page.go
parent4f3c0959635776278f5cc6ab7e5e262fdd3e1219 (diff)
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 'hugolib/page.go')
-rw-r--r--hugolib/page.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/hugolib/page.go b/hugolib/page.go
index d91082b3b..070df133b 100644
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -326,7 +326,7 @@ func (p *Page) initContent() {
select {
case <-ctx.Done():
- p.s.Log.WARN.Printf("WARNING: Timed out creating content for page %q (.Content will be empty). This is most likely a circular shortcode content loop that should be fixed. If this is just a shortcode calling a slow remote service, try to set \"timeout=20000\" (or higher, value is in milliseconds) in config.toml.\n", p.pathOrTitle())
+ p.s.Log.WARN.Printf("Timed out creating content for page %q (.Content will be empty). This is most likely a circular shortcode content loop that should be fixed. If this is just a shortcode calling a slow remote service, try to set \"timeout=30000\" (or higher, value is in milliseconds) in config.toml.\n", p.pathOrTitle())
case err := <-c:
if err != nil {
p.s.SendError(err)
@@ -1456,7 +1456,7 @@ func (p *Page) updateMetaData(frontmatter map[string]interface{}) error {
if draft != nil && published != nil {
p.Draft = *draft
- p.s.Log.WARN.Printf("page %q has both draft and published settings in its frontmatter. Using draft.", p.File.Path())
+ p.s.Log.WARN.Printf("page %q has both draft and published settings in its frontmatter. Using draft.", p.Filename())
} else if draft != nil {
p.Draft = *draft
} else if published != nil {
@@ -1973,8 +1973,6 @@ func (p *Page) initLanguage() {
language := ml.Language(p.lang)
if language == nil {
- // It can be a file named stefano.chiodino.md.
- p.s.Log.WARN.Printf("Page language (if it is that) not found in multilang setup: %s.", p.lang)
language = ml.DefaultLang
}