aboutsummaryrefslogtreecommitdiffhomepage
path: root/deps/deps.go
diff options
context:
space:
mode:
Diffstat (limited to 'deps/deps.go')
-rw-r--r--deps/deps.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/deps/deps.go b/deps/deps.go
index 36620c96b..c0546db76 100644
--- a/deps/deps.go
+++ b/deps/deps.go
@@ -34,10 +34,7 @@ type Deps struct {
Log loggers.Logger `json:"-"`
// Used to log errors that may repeat itself many times.
- DistinctErrorLog *helpers.DistinctLogger
-
- // Used to log warnings that may repeat itself many times.
- DistinctWarningLog *helpers.DistinctLogger
+ LogDistinct loggers.Logger
// The templates to use. This will usually implement the full tpl.TemplateManager.
tmpl tpl.TemplateHandler
@@ -266,14 +263,12 @@ func New(cfg DepsCfg) (*Deps, error) {
ignoreErrors := cast.ToStringSlice(cfg.Cfg.Get("ignoreErrors"))
ignorableLogger := loggers.NewIgnorableLogger(logger, ignoreErrors...)
- distinctErrorLogger := helpers.NewDistinctLogger(logger.Error())
- distinctWarnLogger := helpers.NewDistinctLogger(logger.Warn())
+ logDistinct := helpers.NewDistinctLogger(logger)
d := &Deps{
Fs: fs,
Log: ignorableLogger,
- DistinctErrorLog: distinctErrorLogger,
- DistinctWarningLog: distinctWarnLogger,
+ LogDistinct: logDistinct,
templateProvider: cfg.TemplateProvider,
translationProvider: cfg.TranslationProvider,
WithTemplate: cfg.WithTemplate,