mirror of
https://github.com/caddyserver/caddy.git
synced 2025-08-30 23:02:33 -04:00
http: Make logger first, before TLS provisioning (#7198)
This commit is contained in:
parent
3723e89585
commit
16fe83c7af
@ -170,13 +170,15 @@ func (App) CaddyModule() caddy.ModuleInfo {
|
||||
// Provision sets up the app.
|
||||
func (app *App) Provision(ctx caddy.Context) error {
|
||||
// store some references
|
||||
app.logger = ctx.Logger()
|
||||
app.ctx = ctx
|
||||
|
||||
// provision TLS and events apps
|
||||
tlsAppIface, err := ctx.App("tls")
|
||||
if err != nil {
|
||||
return fmt.Errorf("getting tls app: %v", err)
|
||||
}
|
||||
app.tlsApp = tlsAppIface.(*caddytls.TLS)
|
||||
app.ctx = ctx
|
||||
app.logger = ctx.Logger()
|
||||
|
||||
eventsAppIface, err := ctx.App("events")
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user