diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-11-01 22:27:42 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-11-03 12:06:23 +0100 |
commit | 4b7d3e57a40214a1269eda59731aa22a8f4463dd (patch) | |
tree | 0b258d8dc0c022081a03deac706a84c9dd4e90db /commands/hugo.go | |
parent | 4f3c0959635776278f5cc6ab7e5e262fdd3e1219 (diff) | |
download | hugo-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 'commands/hugo.go')
-rw-r--r-- | commands/hugo.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index 7d2fa9803..175c6dc99 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -131,7 +131,7 @@ func (c *commandeer) createLogger(cfg config.Provider, running bool) (*loggers.L logThreshold = jww.LevelWarn logFile = cfg.GetString("logFile") outHandle = os.Stdout - stdoutThreshold = jww.LevelError + stdoutThreshold = jww.LevelWarn ) if c.h.verboseLog || c.h.logging || (c.h.logFile != "") { @@ -294,7 +294,7 @@ func (c *commandeer) fullBuild() error { if !os.IsNotExist(err) { return errors.Wrap(err, "Error copying static files") } - c.logger.WARN.Println("No Static directory found") + c.logger.INFO.Println("No Static directory found") } langCount = cnt langCount = cnt @@ -405,7 +405,7 @@ func (c *commandeer) doWithPublishDirs(f func(sourceFs *filesystems.SourceFilesy staticFilesystems := c.hugo.BaseFs.SourceFilesystems.Static if len(staticFilesystems) == 0 { - c.logger.WARN.Println("No static directories found to sync") + c.logger.INFO.Println("No static directories found to sync") return langCount, nil } |