diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2014-04-21 04:30:21 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-04-21 20:55:35 +0900 |
commit | 4488761fb5f1d25a6e893ac31fe388b3e9d297d1 (patch) | |
tree | 721b062f2e4a6e4dc202ef35cf4ccfeeb3db44dd | |
parent | d8407d445d850b119a3027d1a3501ae00d99fbcb (diff) |
bgp: improve log visibility
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/services/protocols/bgp/speaker.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ryu/services/protocols/bgp/speaker.py b/ryu/services/protocols/bgp/speaker.py index af8f991a..07ec6dec 100644 --- a/ryu/services/protocols/bgp/speaker.py +++ b/ryu/services/protocols/bgp/speaker.py @@ -361,7 +361,7 @@ class BgpProtocol(Protocol, Activity): self._socket.sendall(notification.serialize()) self._signal_bus.bgp_error(self._peer, code, subcode, reason) LOG.error( - 'Sent notification to %r>> %s' % + 'Sent notification to %r >> %s' % (self._socket.getpeername(), notification) ) self._socket.close() @@ -373,14 +373,13 @@ class BgpProtocol(Protocol, Activity): ' or is no longer is started state.') self._socket.sendall(msg.serialize()) if msg.type == BGP_MSG_NOTIFICATION: - LOG.error('Sent notification to %s>> %s' % + LOG.error('Sent notification to %s >> %s' % (self.get_peername(), msg)) self._signal_bus.bgp_notification_sent(self._peer, msg) else: - LOG.debug('Sent msg. %s to %s>> %s' % - (msg.__class__, self.get_peername(), msg)) + LOG.debug('Sent msg to %s >> %s' % (self.get_peername(), msg)) def stop(self): Activity.stop(self) @@ -426,8 +425,8 @@ class BgpProtocol(Protocol, Activity): message except for *Open* and *Notification* message. On receiving *Notification* message we close connection with peer. """ - LOG.debug('Received %s msg. from %s<< \n%s' % - (msg.__class__, str(self.get_peername()), msg)) + LOG.debug('Received msg from %s << %s' % \ + (str(self.get_peername()), msg)) # If we receive open message we try to bind to protocol if (msg.type == BGP_MSG_OPEN): |