summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/fsm.go3
-rw-r--r--server/peer.go2
2 files changed, 4 insertions, 1 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 21c05399..8d43c6c8 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -16,6 +16,7 @@
package server
import (
+ "encoding/json"
log "github.com/Sirupsen/logrus"
"github.com/osrg/gobgp/config"
"github.com/osrg/gobgp/packet"
@@ -319,6 +320,8 @@ func (h *FSMHandler) sendMessageloop() error {
h.errorCh <- true
return nil
}
+ j, _ := json.Marshal(m)
+ log.Debugf("sent %v: %s", fsm.peerConfig.NeighborAddress, string(j))
fsm.bgpMessageStateUpdate(m.Header.Type, false)
case <-fsm.keepaliveTicker.C:
m := bgp.NewBGPKeepAliveMessage()
diff --git a/server/peer.go b/server/peer.go
index 0bc993e9..08a52530 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -97,7 +97,7 @@ func NewPeer(g config.GlobalType, peer config.NeighborType, serverMsgCh chan *se
func (peer *Peer) handleBGPmessage(m *bgp.BGPMessage) {
j, _ := json.Marshal(m)
- log.Debug(string(j))
+ log.Debugf("received %v: %s", peer.peerConfig.NeighborAddress, j)
switch m.Header.Type {
case bgp.BGP_MSG_OPEN: