diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-22 04:58:46 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-22 04:58:46 -0800 |
commit | a5874d6912e2286fa5af5dc452e3d99ebc38c7a5 (patch) | |
tree | 77724caffc72447f6b4b0d89de643fa980bbfcfa /server/fsm.go | |
parent | 6ecf5e15ceda5e8535727d16a3d04e35cb7f51d0 (diff) |
server: use logger instead of stdout
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/fsm.go')
-rw-r--r-- | server/fsm.go | 5 |
1 files changed, 2 insertions, 3 deletions
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() |