Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
virtcontainers/fc: Add logger to the http transport
Browse files Browse the repository at this point in the history
Add logger to the http transport to log the requests that the runtime writes
in the firecracker's socket. Enable debug it's enabled.

Signed-off-by: Julio Montes <[email protected]>
  • Loading branch information
Julio Montes committed Sep 19, 2019
1 parent 880bb2b commit bb87b44
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virtcontainers/fc.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ func (fc *firecracker) newFireClient() *client.Firecracker {
}

transport := httptransport.New(client.DefaultHost, client.DefaultBasePath, client.DefaultSchemes)
transport.SetLogger(fc.Logger())
transport.SetDebug(fc.Logger().Logger.Level == logrus.DebugLevel)
transport.Transport = socketTransport
httpClient.SetTransport(transport)

Expand Down

0 comments on commit bb87b44

Please sign in to comment.