mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
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
This commit is contained in:
parent
4f3c095963
commit
4b7d3e57a4
8 changed files with 44 additions and 21 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue