summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/log.py
diff options
context:
space:
mode:
authorYour Name <you@example.com>2017-04-13 03:11:59 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-04-13 03:39:07 +0200
commit44af3415a5b1d1e8348b81d983578f3cd8ac05f9 (patch)
tree3cb8327c84bbc1613bf28483ab871009a447094a /src/osmo_gsm_tester/log.py
parent17c139ef4c8aaea9477ba34092fe453afd417c49 (diff)
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
Diffstat (limited to 'src/osmo_gsm_tester/log.py')
-rw-r--r--src/osmo_gsm_tester/log.py12
1 files changed, 12 insertions, 0 deletions
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)