diff options
Diffstat (limited to 'context.go')
-rw-r--r-- | context.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/context.go b/context.go index d196c71b6..32368a9a4 100644 --- a/context.go +++ b/context.go @@ -22,6 +22,7 @@ import ( "reflect" "github.com/mholt/certmagic" + "go.uber.org/zap" ) // Context is a type which defines the lifetime of modules that @@ -206,3 +207,8 @@ func (ctx Context) App(name string) (interface{}, error) { func (ctx Context) Storage() certmagic.Storage { return ctx.cfg.storage } + +// Logger returns a logger that can be used by mod. +func (ctx Context) Logger(mod Module) *zap.Logger { + return ctx.cfg.Logging.Logger(mod) +} |