diff --git a/openeogeotrellis/deploy/batch_job.py b/openeogeotrellis/deploy/batch_job.py index 25caf055..cc4e7eb7 100644 --- a/openeogeotrellis/deploy/batch_job.py +++ b/openeogeotrellis/deploy/batch_job.py @@ -491,7 +491,9 @@ def _extract_and_install_udf_dependencies(process_graph: dict, job_dir: Path): error_summary = GeoPySparkBackendImplementation.summarize_exception_static(e) most_recent_exception = sys.exc_info()[1] fmt = Format(max_value_str_len=1000) - logger.exception("OpenEO batch job failed: " + error_summary.summary, extra = { - "exc_info_with_locals": format_exc(most_recent_exception, fmt = fmt) - }) + logger.exception("OpenEO batch job failed: " + error_summary.summary) + logger.error( + "Batch job error stack trace with locals", + extra={"exc_info_with_locals": format_exc(e, fmt = fmt)} + ) raise