diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/container.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/service/container.go b/service/container.go index c1d21c69..b6840375 100644 --- a/service/container.go +++ b/service/container.go @@ -251,6 +251,11 @@ func (c *container) resolveValues(s interface{}, m reflect.Method, cfg Config) ( case v.Implements(reflect.TypeOf((*Container)(nil)).Elem()): // container values = append(values, reflect.ValueOf(c)) + case v.Implements(reflect.TypeOf((*logrus.StdLogger)(nil)).Elem()), + v.Implements(reflect.TypeOf((*logrus.FieldLogger)(nil)).Elem()), + v.ConvertibleTo(reflect.ValueOf(c.log).Type()): // logger + values = append(values, reflect.ValueOf(c.log)) + case v.Implements(reflect.TypeOf((*HydrateConfig)(nil)).Elem()): // injectable config if cfg == nil { return nil, errNoConfig |