mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-11 07:35:05 -05:00
make a local copy of the schema instead of modifying it directly
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user