Skip to content

Commit

Permalink
Wrap another expensive log.V().Info call in a conditional.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 310266978
  • Loading branch information
gcsl authored and mkhsueh committed May 8, 2020
1 parent ac853c8 commit ae794e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion manager/manager.go
Expand Up @@ -135,7 +135,9 @@ func NewManager(cfg Config) (*Manager, error) {
}

func (m *Manager) handleGNMIUpdate(name string, resp *gpb.SubscribeResponse) error {
log.V(2).Info(resp)
if log.V(2) {
log.Info(resp)
}
if resp.Response == nil {
return fmt.Errorf("nil Response")
}
Expand Down

0 comments on commit ae794e7

Please sign in to comment.