From a5874d6912e2286fa5af5dc452e3d99ebc38c7a5 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Mon, 22 Dec 2014 04:58:46 -0800 Subject: server: use logger instead of stdout Signed-off-by: FUJITA Tomonori --- server/fsm.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/fsm.go') diff --git a/server/fsm.go b/server/fsm.go index e0e26ce9..9dab59e2 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -16,7 +16,7 @@ package server import ( - "fmt" + log "github.com/Sirupsen/logrus" "github.com/osrg/gobgp/config" "github.com/osrg/gobgp/packet" "github.com/osrg/gobgp/table" @@ -96,7 +96,7 @@ func (fsm *FSM) StateChanged() chan int { } func (fsm *FSM) StateChange(nextState int) { - fmt.Println("state changed", nextState, fsm.state) + log.Debugf("Peer (%v) state changed from %v to %v", fsm.peerConfig.NeighborAddress, nextState, fsm.state) fsm.state = nextState } @@ -393,7 +393,6 @@ func (h *FSMHandler) loop() error { } if nextState == bgp.BGP_FSM_ESTABLISHED { - fmt.Println("new peerinfo") // everytime we go into BGP_FSM_ESTABLISHED, we create // a PeerInfo because sourceNum could be incremented fsm.createPeerInfo() -- cgit v1.2.3