summaryrefslogtreecommitdiff
path: root/modules/metrics
diff options
context:
space:
mode:
Diffstat (limited to 'modules/metrics')
-rw-r--r--modules/metrics/metrics.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/metrics/metrics.go b/modules/metrics/metrics.go
index 1ad392c..d4ad977 100644
--- a/modules/metrics/metrics.go
+++ b/modules/metrics/metrics.go
@@ -62,7 +62,7 @@ func (l *zapLogger) Println(v ...any) {
// Provision sets up m.
func (m *Metrics) Provision(ctx caddy.Context) error {
- log := ctx.Logger(m)
+ log := ctx.Logger()
m.metricsHandler = createMetricsHandler(&zapLogger{log}, !m.DisableOpenMetrics)
return nil
}
@@ -75,10 +75,9 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
// UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax:
//
-// metrics [<matcher>] {
-// disable_openmetrics
-// }
-//
+// metrics [<matcher>] {
+// disable_openmetrics
+// }
func (m *Metrics) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
for d.Next() {
args := d.RemainingArgs()