diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a92ae4a..8b387eaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/) and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.9.3] +### Fixed +* @scottyhq fixed excessively verbose logging due to ISCE2 setting the root logger to `DEBUG` in [#176](https://github.com/ASFHyP3/hyp3-isce2/issues/176) + ## [0.9.2] ### Fixed * `No annotation xml file` error in `insar_tops_burst` when processing HH pairs. Fixes [#168](https://github.com/ASFHyP3/hyp3-isce2/issues/168). diff --git a/src/hyp3_isce2/__init__.py b/src/hyp3_isce2/__init__.py index 1f987c08..9115e69b 100644 --- a/src/hyp3_isce2/__init__.py +++ b/src/hyp3_isce2/__init__.py @@ -1,4 +1,5 @@ """HyP3 plugin for ISCE2 processing""" +import logging import os from importlib.metadata import version from pathlib import Path @@ -6,13 +7,18 @@ # Ensures all ISCE2 paths and environment variables are set when using this module, see: # https://github.com/isce-framework/isce2/blob/main/__init__.py#L41-L50 import isce # noqa: F401 + +# ISCE2 sets the root logger to DEBUG resulting in excessively verbose logging, see: +# https://github.com/isce-framework/isce2/issues/258 +root_logger = logging.getLogger() +root_logger.setLevel('WARNING') + # ISCE2 also needs its applications to be on the system path, even though they say it's only "for convenience", see: # https://github.com/isce-framework/isce2#setup-your-environment ISCE_APPLICATIONS = str(Path(os.environ['ISCE_HOME']) / 'applications') if ISCE_APPLICATIONS not in (PATH := os.environ['PATH'].split(os.pathsep)): os.environ['PATH'] = os.pathsep.join([ISCE_APPLICATIONS] + PATH) - __version__ = version(__name__) __all__ = [