Tidy up bride debugging

api
Simon 3 years ago
parent 5b18073e3a
commit 2e87da2633

@ -391,11 +391,11 @@ def statTrimmer():
#Debug and fix bridge table issues. #Debug and fix bridge table issues.
def bridgeDebug(): def bridgeDebug():
logger.info('(BRIDGEDEBUG) Running bridge debug') logger.info('(BRIDGEDEBUG) Running bridge debug')
statroll = 0
for system in CONFIG['SYSTEMS']: for system in CONFIG['SYSTEMS']:
bridgeroll = 0 bridgeroll = 0
dialroll = 0 dialroll = 0
activeroll = 0 activeroll = 0
statroll = 0
for _bridge in BRIDGES: for _bridge in BRIDGES:
for enabled_system in BRIDGES[_bridge]: for enabled_system in BRIDGES[_bridge]:
if enabled_system['SYSTEM'] == system: if enabled_system['SYSTEM'] == system:
@ -409,7 +409,7 @@ def bridgeDebug():
if enabled_system['TO_TYPE'] == 'STAT': if enabled_system['TO_TYPE'] == 'STAT':
statroll += 1 statroll += 1
if bridgeroll: if bridgeroll:
logger.info('(BRIDGEDEBUG) system %s has %s bridges of which %s are in an ACTIVE state', system, bridgeroll, activeroll) logger.warning('(BRIDGEDEBUG) system %s has %s bridges of which %s are in an ACTIVE state', system, bridgeroll, activeroll)
if dialroll > 1 : if dialroll > 1 :
logger.warning('(BRIDGEDEBUG) system %s has more than one active dial bridge (%s) - fixing',system, dialroll) logger.warning('(BRIDGEDEBUG) system %s has more than one active dial bridge (%s) - fixing',system, dialroll)

Loading…
Cancel
Save

Powered by TurnKey Linux.