diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-26 17:16:07 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-26 18:17:29 (GMT) |
commit | dab868b20b936add86967eafe32711413b80dd6e (patch) | |
tree | 60fa49f59a8de148bd3fad607f688851678bbde8 /devbot/run.py | |
parent | 67d36d7eed2bf07063ba9cc7b3720f1efa4560ce (diff) |
Rework logging and output
Use the logs for all the commands output. Tail the log
if there is an error. Create a link to the latest log
so that buildbot can find it easily.
Diffstat (limited to 'devbot/run.py')
-rw-r--r-- | devbot/run.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/devbot/run.py b/devbot/run.py index 34edab9..9bd2a25 100644 --- a/devbot/run.py +++ b/devbot/run.py @@ -71,20 +71,11 @@ def collect_logs(source_path, log_name): with open(path) as f: logs[filename] = f.read() - log_path = config.get_log_path(log_name) + log_path = config.create_log(log_name) with open(log_path, "w") as f: for filename, log in logs.items(): f.write("\n===== %s =====\n\n%s" % (filename, log)) - last_log_path = os.path.join(config.logs_dir, "%s.log" % log_name) - - try: - os.unlink(last_log_path) - except OSError: - pass - - os.symlink(log_path, last_log_path) - def _get_random_id(): return ''.join(random.choice(string.letters) for i in xrange(8)) |