diff --git a/opendm/remote.py b/opendm/remote.py index ff471b02..656729d6 100644 --- a/opendm/remote.py +++ b/opendm/remote.py @@ -398,7 +398,14 @@ class Task: except exceptions.TaskFailedError as e: # Try to get output try: - msg = "(%s) failed with task output: %s" % (task.uuid, "\n".join(task.output()[-10:])) + output_lines = task.output() + + # Save to file + error_log_path = self.path("error.log") + with open(error_log_path, 'w') as f: + f.write('\n'.join(output_lines) + '\n') + + msg = "(%s) failed with task output: %s\nFull log saved at %s" % (task.uuid, "\n".join(output_lines[-10:]), error_log_path) done(exceptions.TaskFailedError(msg)) except: log.ODM_WARNING("LRE: Could not retrieve task output for %s (%s)" % (self, task.uuid)) diff --git a/run.py b/run.py index 1c53bb4b..0327ef9d 100755 --- a/run.py +++ b/run.py @@ -16,6 +16,17 @@ if __name__ == '__main__': log.ODM_INFO('Initializing OpenDroneMap app - %s' % system.now()) + # Print args + args_dict = vars(args) + log.ODM_DEBUG('==============') + for k in sorted(args_dict.keys()): + # Don't leak token + if k == 'sm_cluster' and args_dict[k] is not None: + log.ODM_DEBUG('%s: True') + else: + log.ODM_DEBUG('%s: %s' % (k, args_dict[k])) + log.ODM_DEBUG('==============') + progressbc.set_project_name(args.name) # Add project dir if doesn't exist