summaryrefslogtreecommitdiffstats
path: root/tpl/fmt/fmt.go
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/fmt/fmt.go')
-rw-r--r--tpl/fmt/fmt.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/tpl/fmt/fmt.go b/tpl/fmt/fmt.go
index aa6b8c1a6..924d27a1d 100644
--- a/tpl/fmt/fmt.go
+++ b/tpl/fmt/fmt.go
@@ -23,10 +23,17 @@ import (
// New returns a new instance of the fmt-namespaced template functions.
func New(d *deps.Deps) *Namespace {
- return &Namespace{
+ ns := &Namespace{
errorLogger: helpers.NewDistinctLogger(d.Log.ERROR),
warnLogger: helpers.NewDistinctLogger(d.Log.WARN),
}
+
+ d.BuildStartListeners.Add(func() {
+ ns.errorLogger.Reset()
+ ns.warnLogger.Reset()
+ })
+
+ return ns
}
// Namespace provides template functions for the "fmt" namespace.