Skip to content

Commit 51701b6

Browse files
committed
adding exception record log level processing
1 parent 2a9abff commit 51701b6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sliderule/sliderule.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,12 @@ def __logeventrec(rec):
333333
#
334334
def __raiseexceptrec(rec):
335335
rc = rec["code"]
336+
lvl = rec["level"]
336337
if rc in handleexcept:
337-
if verbose:
338-
logger.info("%s exception <%d>: %s", handleexcept[rc]["name"], rc, rec["text"])
339338
if not handleexcept[rc]["expected"]:
340339
logger.critical("Unexpected error: %s", handleexcept[rc]["name"])
340+
elif verbose:
341+
eventlogger[rec['level']]("%s exception <%d>: %s", handleexcept[rc]["name"], rc, rec["text"])
341342
if not handleexcept[rc]["fatal"]:
342343
raise TransientError()
343344

utils/region_of_interest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def process_atl06_algorithm(parms, asset):
6565
"organization": None,
6666
"asset": 'atlas-local',
6767
"region": 'examples/grandmesa.geojson',
68+
"verbose": True
6869
}
6970

7071
# Parse Configuration Parameters
@@ -77,7 +78,7 @@ def process_atl06_algorithm(parms, asset):
7778
region = icesat2.toregion(cfg["region"])
7879

7980
# Configure SlideRule #
80-
icesat2.init(cfg["url"], False, organization=cfg["organization"])
81+
icesat2.init(cfg["url"], cfg["verbose"], organization=cfg["organization"])
8182

8283
# Build ATL06 Request #
8384
parms = {

0 commit comments

Comments
 (0)