From 44af3415a5b1d1e8348b81d983578f3cd8ac05f9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 13 Apr 2017 03:11:59 +0200 Subject: fix octphy, fix conf, improve logging Clearly separate the kinds of BTS hardware the GSM tester knows ('type') from the NITB's bts/type config item ('osmobsc_bts_type' -- not 'osmonitb_...' to stay in tune with future developments: it is the libbsc that needs this). For BTS hardware kinds, use the full name of the binary for osmo driven models: osmo-bts-sysmo, osmo-bts-trx, osmo-bts-octphy. Change-Id: I1aa9b48e74013a93f9db1a34730f17717fb3b36c --- src/osmo_gsm_tester/log.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/osmo_gsm_tester/log.py') diff --git a/src/osmo_gsm_tester/log.py b/src/osmo_gsm_tester/log.py index f56d2c9..3e96999 100644 --- a/src/osmo_gsm_tester/log.py +++ b/src/osmo_gsm_tester/log.py @@ -186,6 +186,14 @@ class LogTarget: log_str = log_str + '\n' self.log_sink(log_str) + def large_separator(self, *msgs): + msg = ' '.join(msgs) + if not msg: + msg = '------------------------------------------' + self.log_sink('------------------------------------------\n' + '%s\n' + '------------------------------------------\n' % msg) + targets = [ LogTarget() ] def level_str(level): @@ -207,6 +215,10 @@ def _log_all_targets(origin, category, level, src, messages, named_items=None): for target in targets: target.log(origin, category, level, src, messages, named_items) +def large_separator(*msgs): + for target in targets: + target.large_separator(*msgs) + def get_src_from_caller(levels_up=1): caller = getframeinfo(stack()[levels_up][0]) return '%s:%d' % (os.path.basename(caller.filename), caller.lineno) -- cgit v1.2.3