summaryrefslogtreecommitdiff
path: root/rtemstoolkit/log.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2019-05-30 20:25:36 +1000
committerChris Johns <chrisj@rtems.org>2019-06-11 11:00:30 +1000
commit5dd75b028aeb8dd80efdb5357fd4e2b4487a1622 (patch)
tree306d15ca70e35190eb40d7e2f44c133655527b38 /rtemstoolkit/log.py
parent9b153bc20fa5d0df40eee06f0700e20bd4ccec84 (diff)
rtemstoolkit/log: Add info().
Diffstat (limited to 'rtemstoolkit/log.py')
-rwxr-xr-xrtemstoolkit/log.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/rtemstoolkit/log.py b/rtemstoolkit/log.py
index a06c8c1..00fdb05 100755
--- a/rtemstoolkit/log.py
+++ b/rtemstoolkit/log.py
@@ -61,6 +61,20 @@ quiet = False
#
lock = threading.Lock()
+def info(args):
+ s = [' Command Line: %s' % (' '.join(args))]
+ if hasattr(os, 'uname'):
+ s += [' Host: %s' % (' '.join(os.uname()))]
+ else:
+ h = ' Host: win32-mingw'
+ if 'HOSTTYPE' in os.environ:
+ h += ' ' + os.environ['HOSTTYPE']
+ else:
+ h += ' i686'
+ s += [h]
+ s += [' Python: %s' % (sys.version.replace('\n', ''))]
+ return s
+
def set_default_once(log):
if default is None:
default = log