Skip to content

Commit

Permalink
Issue #939 disable exc_info_with_locals logging for now
Browse files Browse the repository at this point in the history
This is quickfix that need future fine-tuning (or complete removal)

Also avoid importing generic symbols like "Format" in global namespace
  • Loading branch information
soxofaan committed Nov 14, 2024
1 parent 5e0f8cb commit 7a507dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion openeogeotrellis/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.49.1a1"
__version__ = "0.49.2a1"
10 changes: 7 additions & 3 deletions openeogeotrellis/deploy/batch_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from pyspark import SparkConf, SparkContext
from pyspark.profiler import BasicProfiler
from shapely.geometry import mapping
from traceback_with_variables import Format, format_exc
import traceback_with_variables

from openeogeotrellis._version import __version__
from openeogeotrellis.backend import (
Expand Down Expand Up @@ -741,9 +741,13 @@ def start_main():
main(sys.argv)
except Exception as e:
error_summary = GeoPySparkBackendImplementation.summarize_exception_static(e)
fmt = Format(max_value_str_len=1000)
logger.exception("OpenEO batch job failed: " + error_summary.summary)
logger.info("Batch job error stack trace with locals", extra={"exc_info_with_locals": format_exc(e, fmt=fmt)})
if False: # TODO #939
fmt = traceback_with_variables.Format(max_value_str_len=100)
logger.info(
"Batch job error stack trace with locals",
extra={"exc_info_with_locals": traceback_with_variables.format_exc(e, fmt=fmt)},
)
raise


Expand Down

0 comments on commit 7a507dd

Please sign in to comment.