make a local copy of the schema instead of modifying it directly

This commit is contained in:
Yuan Teoh
2026-02-10 16:36:44 -08:00
parent df0229c882
commit d55666504d

View File

@@ -348,12 +348,12 @@ func NewServer(ctx context.Context, cfg ServerConfig) (*Server, error) {
return nil, fmt.Errorf("unable to initialize http log: %w", err)
}
schema := httplog.SchemaGCP
schema := *httplog.SchemaGCP
schema.Level = cfg.LogLevel.String()
schema.Concise(true)
httpOpts := &httplog.Options{
Level: logLevel,
Schema: schema,
Schema: &schema,
}
logger := l.SlogLogger()
r.Use(httplog.RequestLogger(logger, httpOpts))