summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/log.py
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-04-10 03:45:30 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-04-10 05:09:23 +0200
commit5356d0adcef703dc965b03028e6c9a4afd23fb79 (patch)
tree8ca2a85ac637c0e6fca74120145e735ac4be6c91 /src/osmo_gsm_tester/log.py
parent85eb324165a8f4076fdd58f9d84b6c0443b5beb9 (diff)
trying to get sysmobts to work and various details
I know that these commit messages aren't very good, but the code is not stable yet, so I'm not bothering with details. Change-Id: I2d5e5f4a5407725d71093cbd71ef97b271eb8197
Diffstat (limited to 'src/osmo_gsm_tester/log.py')
-rw-r--r--src/osmo_gsm_tester/log.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/osmo_gsm_tester/log.py b/src/osmo_gsm_tester/log.py
index a4f78df..f56d2c9 100644
--- a/src/osmo_gsm_tester/log.py
+++ b/src/osmo_gsm_tester/log.py
@@ -66,7 +66,7 @@ class LogTarget:
get_time_str = lambda self: time.strftime(self.log_time_fmt)
# sink that gets each complete logging line
- log_sink = sys.stderr.write
+ log_sink = sys.__stdout__.write
category_levels = None
@@ -182,8 +182,9 @@ class LogTarget:
loglevel,
' '.join(log_line))
- self.log_sink(log_str.strip() + '\n')
-
+ if not log_str.endswith('\n'):
+ log_str = log_str + '\n'
+ self.log_sink(log_str)
targets = [ LogTarget() ]