From 943c81d8785b10c533fd04e5fbb7340166b2466c Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 22 May 2017 20:16:03 +0200 Subject: debug: config logging before templates: use pprint and an all-caps label Change-Id: I0e1c1d3ce8163d5b40c17b7d0fb0847a068ced76 --- src/osmo_gsm_tester/bts_osmotrx.py | 4 +++- src/osmo_gsm_tester/bts_sysmo.py | 4 +++- src/osmo_gsm_tester/osmo_nitb.py | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 07f7d6e..70ac511 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -18,6 +18,7 @@ # along with this program. If not, see . import os +import pprint from . import log, config, util, template, process class OsmoBtsTrx(log.Origin): @@ -93,7 +94,8 @@ class OsmoBtsTrx(log.Origin): config.overlay(values, self.suite_run.config()) config.overlay(values, dict(osmo_bts_trx=dict(oml_remote_ip=self.nitb.addr()))) config.overlay(values, dict(osmo_bts_trx=self.conf)) - self.dbg(conf=values) + + self.dbg('OSMO-BTS-TRX CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: r = template.render(OsmoBtsTrx.CONF_BTS_TRX, values) diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 771d303..e445838 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -18,6 +18,7 @@ # along with this program. If not, see . import os +import pprint from . import log, config, util, template, process class SysmoBts(log.Origin): @@ -120,7 +121,8 @@ class SysmoBts(log.Origin): config.overlay(values, self.suite_run.config()) config.overlay(values, { 'osmo_bts_sysmo': { 'oml_remote_ip': self.nitb.addr() } }) config.overlay(values, { 'osmo_bts_sysmo': self.conf }) - self.dbg(conf=values) + + self.dbg('SYSMOBTS CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: r = template.render(SysmoBts.BTS_SYSMO_CFG, values) diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py index 2515354..50ce5ae 100644 --- a/src/osmo_gsm_tester/osmo_nitb.py +++ b/src/osmo_gsm_tester/osmo_nitb.py @@ -19,6 +19,7 @@ import os import re +import pprint from . import log, util, config, template, process, osmo_ctrl, pcap_recorder @@ -76,7 +77,7 @@ class OsmoNitb(log.Origin): bts_list.append(bts.conf_for_nitb()) config.overlay(values, dict(nitb=dict(net=dict(bts_list=bts_list)))) - self.dbg(conf=values) + self.dbg('NITB CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: r = template.render('osmo-nitb.cfg', values) -- cgit v1.2.3