diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2021-03-04 18:46:35 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2021-03-04 18:46:35 +0300 |
commit | 6b5b3359d8d57eed7a75a42eb5410aa25d211fb7 (patch) | |
tree | 1a0853c8f9429db192dc14baa6c8f943d41d61b7 /internal/praefect/config | |
parent | cdb02af5b322de1f4091b39c349579b2e335b914 (diff) |
inject loggers into log.Configure
This commit changes log package's Configure function to take the
loggers as a parameter and fixes up call sites to pass the global
loggers explicitly. This aims to make the function more testable.
Diffstat (limited to 'internal/praefect/config')
-rw-r--r-- | internal/praefect/config/log.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/praefect/config/log.go b/internal/praefect/config/log.go index 724d81f92..352eb69f2 100644 --- a/internal/praefect/config/log.go +++ b/internal/praefect/config/log.go @@ -8,7 +8,7 @@ import ( // ConfigureLogger applies the settings from the configuration file to the // logger, setting the log level and format. func (c Config) ConfigureLogger() *logrus.Entry { - log.Configure(c.Logging.Format, c.Logging.Level) + log.Configure(log.Loggers, c.Logging.Format, c.Logging.Level) return log.Default() } |