Reduce logging
This commit is contained in:
parent
9fb429c2e3
commit
ec755dcb26
12
hblink.py
12
hblink.py
@ -124,7 +124,7 @@ class OPENBRIDGE(DatagramProtocol):
|
||||
_packet = b''.join([_packet, (hmac_new(self._config['PASSPHRASE'],_packet,sha1).digest())])
|
||||
self.transport.write(_packet, (self._config['TARGET_IP'], self._config['TARGET_PORT']))
|
||||
# KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!!
|
||||
logger.debug('(%s) TX Packet to OpenBridge %s:%s -- %s', self._system, self._config['TARGET_IP'], self._config['TARGET_PORT'], ahex(_packet))
|
||||
#logger.debug('(%s) TX Packet to OpenBridge %s:%s -- %s', self._system, self._config['TARGET_IP'], self._config['TARGET_PORT'], ahex(_packet))
|
||||
else:
|
||||
logger.error('(%s) OpenBridge system was asked to send non DMRD packet: %s', self._system, _packet)
|
||||
|
||||
@ -273,7 +273,7 @@ class HBSYSTEM(DatagramProtocol):
|
||||
def send_peers(self, _packet):
|
||||
for _peer in self._peers:
|
||||
self.send_peer(_peer, _packet)
|
||||
logger.debug('(%s) Packet sent to peer %s', self._system, self._peers[_peer]['RADIO_ID'])
|
||||
#logger.debug('(%s) Packet sent to peer %s', self._system, self._peers[_peer]['RADIO_ID'])
|
||||
|
||||
def send_peer(self, _peer, _packet):
|
||||
if _packet[:4] == DMRD:
|
||||
@ -287,7 +287,7 @@ class HBSYSTEM(DatagramProtocol):
|
||||
_packet = b''.join([_packet[:11], self._config['RADIO_ID'], _packet[15:]])
|
||||
self.transport.write(_packet, self._config['MASTER_SOCKADDR'])
|
||||
# KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!!
|
||||
logger.debug('(%s) TX Packet to %s:%s -- %s', self._system, self._config['MASTER_IP'], self._config['MASTER_PORT'], ahex(_packet))
|
||||
#logger.debug('(%s) TX Packet to %s:%s -- %s', self._system, self._config['MASTER_IP'], self._config['MASTER_PORT'], ahex(_packet))
|
||||
|
||||
def send_xlxmaster(self, radio, xlx, mastersock):
|
||||
radio3 = int.from_bytes(radio, 'big').to_bytes(3, 'big')
|
||||
@ -309,7 +309,7 @@ class HBSYSTEM(DatagramProtocol):
|
||||
_packet = b''.join([DMRD, packetnr1, radio3, xlx3, radio4, strmtype1, streamid, payload])
|
||||
self.transport.write(_packet, mastersock)
|
||||
# KEEP THE FOLLOWING COMMENTED OUT UNLESS YOU'RE DEBUGGING DEEPLY!!!!
|
||||
logger.debug('(%s) XLX Module Change Packet: %s', self._system, ahex(_packet))
|
||||
#logger.debug('(%s) XLX Module Change Packet: %s', self._system, ahex(_packet))
|
||||
return
|
||||
|
||||
def dmrd_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data):
|
||||
@ -514,7 +514,7 @@ class HBSYSTEM(DatagramProtocol):
|
||||
self._peers[_peer_id]['PINGS_RECEIVED'] += 1
|
||||
self._peers[_peer_id]['LAST_PING'] = time()
|
||||
self.send_peer(_peer_id, b''.join([MSTPONG, _peer_id]))
|
||||
logger.debug('(%s) Received and answered RPTPING from peer %s (%s)', self._system, self._peers[_peer_id]['CALLSIGN'], int_id(_peer_id))
|
||||
#logger.debug('(%s) Received and answered RPTPING from peer %s (%s)', self._system, self._peers[_peer_id]['CALLSIGN'], int_id(_peer_id))
|
||||
else:
|
||||
self.transport.write(b''.join([MSTNAK, _peer_id]), _sockaddr)
|
||||
logger.warning('(%s) Ping from Radio ID that is not logged in: %s', self._system, int_id(_peer_id))
|
||||
@ -674,7 +674,7 @@ class HBSYSTEM(DatagramProtocol):
|
||||
self._stats['PING_OUTSTANDING'] = False
|
||||
self._stats['NUM_OUTSTANDING'] = 0
|
||||
self._stats['PINGS_ACKD'] += 1
|
||||
logger.debug('(%s) MSTPONG Received. Pongs Since Connected: %s', self._system, self._stats['PINGS_ACKD'])
|
||||
#logger.debug('(%s) MSTPONG Received. Pongs Since Connected: %s', self._system, self._stats['PINGS_ACKD'])
|
||||
|
||||
elif _command == MSTC: # Actually MSTCL -- notify us the master is closing down
|
||||
_peer_id = _data[5:9]
|
||||
|
Loading…
Reference in New Issue
Block a user