mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
019bd5576b
commit
bf5f10faa9
3 changed files with 9 additions and 1 deletions
|
@ -670,7 +670,6 @@ func (c *commandeer) resetAndBuildSites() (err error) {
|
||||||
func (c *commandeer) initSites() error {
|
func (c *commandeer) initSites() error {
|
||||||
if c.hugo != nil {
|
if c.hugo != nil {
|
||||||
c.hugo.Cfg = c.Cfg
|
c.hugo.Cfg = c.Cfg
|
||||||
c.hugo.Log.ResetLogCounters()
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -280,6 +280,14 @@ func (h *HugoSites) reset() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// resetLogs resets the log counters etc. Used to do a new build on the same sites.
|
||||||
|
func (h *HugoSites) resetLogs() {
|
||||||
|
h.Log.ResetLogCounters()
|
||||||
|
for _, s := range h.Sites {
|
||||||
|
s.Deps.DistinctErrorLog = helpers.NewDistinctLogger(h.Log.ERROR)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (h *HugoSites) createSitesFromConfig() error {
|
func (h *HugoSites) createSitesFromConfig() error {
|
||||||
oldLangs, _ := h.Cfg.Get("languagesSorted").(helpers.Languages)
|
oldLangs, _ := h.Cfg.Get("languagesSorted").(helpers.Languages)
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,7 @@ func (h *HugoSites) initRebuild(config *BuildCfg) error {
|
||||||
s.resetBuildState()
|
s.resetBuildState()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h.resetLogs()
|
||||||
helpers.InitLoggers()
|
helpers.InitLoggers()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue