Skip to content

Commit

Permalink
Do not print all RDMA resources to logs
Browse files Browse the repository at this point in the history
RDMA resources output doesn't contain a lot of useful information
but floods a logs with thousands of similar records. This patch
changes logs output to print only resources count.

Signed-off-by: Ivan Kolodyazhny <ikolodiazhny@nvidia.com>
  • Loading branch information
e0ne committed Apr 15, 2021
1 parent 7d66db8 commit e159fd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/resources/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func (rs *resourceServer) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlu
if err := s.Send(resp); err != nil {
log.Printf("error: failed to update \"%s\" resouces: %v", rs.resourceName, err)
} else {
log.Println("exposing devices: ", rs.devs)
log.Printf("exposing \"%d\" devices", len(rs.devs))
}
rs.mutex.RUnlock()
}
Expand Down Expand Up @@ -383,7 +383,7 @@ func (rs *resourceServer) UpdateDevices(devices []types.PciNetDevice) {
// If not devices not changed skip
if !devicesChanged(rs.deviceSpec, deviceSpec) {
log.Printf("no changes to devices for \"%s\"", rs.resourceName)
log.Println("exposing devices: ", rs.devs)
log.Printf("exposing \"%d\" devices", len(rs.devs))
return
}

Expand Down

0 comments on commit e159fd7

Please sign in to comment.