Skip to content

Commit

Permalink
Mount clue HTTP request log middleware
Browse files Browse the repository at this point in the history
in generated examples
  • Loading branch information
raphael committed Jul 7, 2024
1 parent c6dc4dc commit 44b2cb8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions http/codegen/templates/server_middleware.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
// Log query and response bodies if debug logs are enabled.
handler = debug.HTTP()(handler)
}
handler = log.HTTP(ctx)(handler)
1 change: 1 addition & 0 deletions http/codegen/testdata/server-no-server.golden
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func handleHTTPServer(ctx context.Context, u *url.URL, serviceEndpoints *service
// Log query and response bodies if debug logs are enabled.
handler = debug.HTTP()(handler)
}
handler = log.HTTP(ctx)(handler)

// Start HTTP server using default configuration, change the code to
// configure the server as required by your service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func handleHTTPServer(ctx context.Context, u *url.URL, serviceEndpoints *service
// Log query and response bodies if debug logs are enabled.
handler = debug.HTTP()(handler)
}
handler = log.HTTP(ctx)(handler)

// Start HTTP server using default configuration, change the code to
// configure the server as required by your service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func handleHTTPServer(ctx context.Context, u *url.URL, serviceEndpoints *service
// Log query and response bodies if debug logs are enabled.
handler = debug.HTTP()(handler)
}
handler = log.HTTP(ctx)(handler)

// Start HTTP server using default configuration, change the code to
// configure the server as required by your service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func handleHTTPServer(ctx context.Context, u *url.URL, wg *sync.WaitGroup, errc
// Log query and response bodies if debug logs are enabled.
handler = debug.HTTP()(handler)
}
handler = log.HTTP(ctx)(handler)

// Start HTTP server using default configuration, change the code to
// configure the server as required by your service.
Expand Down
1 change: 1 addition & 0 deletions http/codegen/testdata/server-streaming.golden
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func handleHTTPServer(ctx context.Context, u *url.URL, streamingServiceAEndpoint
// Log query and response bodies if debug logs are enabled.
handler = debug.HTTP()(handler)
}
handler = log.HTTP(ctx)(handler)

// Start HTTP server using default configuration, change the code to
// configure the server as required by your service.
Expand Down

0 comments on commit 44b2cb8

Please sign in to comment.