mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Add missing template error logging
This commit is contained in:
parent
89e3125664
commit
0406be3d54
3 changed files with 3 additions and 8 deletions
|
@ -17,7 +17,6 @@ import (
|
||||||
"github.com/spf13/hugo/helpers"
|
"github.com/spf13/hugo/helpers"
|
||||||
"github.com/spf13/hugo/hugofs"
|
"github.com/spf13/hugo/hugofs"
|
||||||
"github.com/spf13/hugo/source"
|
"github.com/spf13/hugo/source"
|
||||||
jww "github.com/spf13/jwalterweatherman"
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
@ -29,7 +28,6 @@ type testSiteConfig struct {
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
testCommonResetState()
|
testCommonResetState()
|
||||||
jww.SetStdoutThreshold(jww.LevelCritical)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func testCommonResetState() {
|
func testCommonResetState() {
|
||||||
|
|
|
@ -33,11 +33,6 @@ import (
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
|
||||||
//There are expected ERROR logging in tests that produces a lot of noise.
|
|
||||||
jww.SetStdoutThreshold(jww.LevelCritical)
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
pageSimpleTitle = `---
|
pageSimpleTitle = `---
|
||||||
title: simple template
|
title: simple template
|
||||||
|
|
|
@ -460,7 +460,9 @@ func (t *GoHTMLTemplate) loadTemplates(absPath string, prefix string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
t.AddTemplateFile(tplName, baseTemplatePath, path)
|
if err := t.AddTemplateFile(tplName, baseTemplatePath, path); err != nil {
|
||||||
|
jww.ERROR.Printf("Failed to add template %s: %s", tplName, err)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue