summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/log.py
diff options
context:
space:
mode:
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() ]