diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-02-25 14:06:37 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-02-25 14:06:37 +0900 |
commit | 8d1ad9a4bdb4206e3a1999f74b8979a3bb55761e (patch) | |
tree | e6a00e2ba8af8d76c6809c42dd0334063ab06b75 | |
parent | 5974937803899fa32763423c267a26b1be0cdcae (diff) |
server: avoid duplicated logging (debug and warning) for notification message
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | server/fsm.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/server/fsm.go b/server/fsm.go index 5c9a26c5..acc4e3ec 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -604,11 +604,6 @@ func (h *FSMHandler) sendMessageloop() error { h.errorCh <- true return nil } - log.WithFields(log.Fields{ - "Topic": "Peer", - "Key": fsm.peerConfig.NeighborAddress, - "data": m, - }).Debug("sent") fsm.bgpMessageStateUpdate(m.Header.Type, false) if m.Header.Type == bgp.BGP_MSG_NOTIFICATION { @@ -621,7 +616,14 @@ func (h *FSMHandler) sendMessageloop() error { h.errorCh <- true conn.Close() return nil + } else { + log.WithFields(log.Fields{ + "Topic": "Peer", + "Key": fsm.peerConfig.NeighborAddress, + "data": m, + }).Debug("sent") } + case <-fsm.keepaliveTicker.C: m := bgp.NewBGPKeepAliveMessage() b, _ := m.Serialize() |