diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-10 14:14:16 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-10 14:14:16 +0900 |
commit | 9c94fd72f75260efbc22b1e05f660a51c3fafefb (patch) | |
tree | 54cdd1e317fb222f56169e6b082e5da00dee656c /server | |
parent | 18738e1b437aad7d30eb4fd6687ff3e7b0c77a17 (diff) |
server: pretty notification error code log
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/fsm.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/fsm.go b/server/fsm.go index 351a8e99..8838ac23 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -671,7 +671,7 @@ func (h *FSMHandler) recvMessageWithError() (*FsmMsg, error) { "Data": body.Data, }).Warn("received notification") - sendToErrorCh(FsmStateReason(fmt.Sprintf("%s(%d/%d)", FSM_NOTIFICATION_RECV, body.ErrorCode, body.ErrorSubcode))) + sendToErrorCh(FsmStateReason(fmt.Sprintf("%s %s", FSM_NOTIFICATION_RECV, bgp.NewNotificationErrorCode(body.ErrorCode, body.ErrorSubcode).String()))) return nil, nil } } @@ -1048,7 +1048,7 @@ func (h *FSMHandler) sendMessageloop() error { "Data": m, }).Warn("sent notification") body := m.Body.(*bgp.BGPNotification) - h.errorCh <- FsmStateReason(fmt.Sprintf("%s(%d/%d)", FSM_NOTIFICATION_SENT, body.ErrorCode, body.ErrorSubcode)) + h.errorCh <- FsmStateReason(fmt.Sprintf("%s %s", FSM_NOTIFICATION_SENT, bgp.NewNotificationErrorCode(body.ErrorCode, body.ErrorSubcode).String())) conn.Close() return fmt.Errorf("closed") case bgp.BGP_MSG_UPDATE: |