From bd472f1a335384cbc987aa0c08e69ba988e655b4 Mon Sep 17 00:00:00 2001 From: Baudouin Raoult Date: Fri, 4 Sep 2020 07:38:09 +0100 Subject: [PATCH] Change logging to be more quiet --- cfgrib/bindings.py | 4 ++-- cfgrib/dataset.py | 2 +- cfgrib/xarray_to_grib.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cfgrib/bindings.py b/cfgrib/bindings.py index e27168df..f34d691a 100644 --- a/cfgrib/bindings.py +++ b/cfgrib/bindings.py @@ -53,12 +53,12 @@ def __getattr__(self, attr): for libname in LIBNAMES: try: lib = ffi.dlopen(libname) - LOG.info("ecCodes library found using name '%s'.", libname) + LOG.debug("ecCodes library found using name '%s'.", libname) break except OSError as exc: # lazy exception lib = RaiseOnAttributeAccess(exc, 'ecCodes library not found on the system.') - LOG.info("ecCodes library not found using name '%s'.", libname) + LOG.debug("ecCodes library not found using name '%s'.", libname) # default encoding for ecCodes strings diff --git a/cfgrib/dataset.py b/cfgrib/dataset.py index 238781ad..10da9d61 100644 --- a/cfgrib/dataset.py +++ b/cfgrib/dataset.py @@ -466,7 +466,7 @@ def build_variable_components( for coord_key in coords_map: values = index[coord_key] if len(values) == 1 and values[0] == 'undef': - log.info("missing from GRIB stream: %r" % coord_key) + log.debug("missing from GRIB stream: %r" % coord_key) continue coord_name = coord_key if ( diff --git a/cfgrib/xarray_to_grib.py b/cfgrib/xarray_to_grib.py index f93c8616..2d179bd6 100644 --- a/cfgrib/xarray_to_grib.py +++ b/cfgrib/xarray_to_grib.py @@ -137,7 +137,7 @@ def detect_sample_name(grib_keys, sample_name_template='{geography}_{vertical}_g if grib_keys['gridType'] in GRID_TYPES: geography = grib_keys['gridType'] else: - LOGGER.info("unknown 'gridType': %r. Using GRIB2 template", grib_keys['gridType']) + LOGGER.warning("unknown 'gridType': %r. Using GRIB2 template", grib_keys['gridType']) return 'GRIB2' if grib_keys['typeOfLevel'] in TYPE_OF_LEVELS_PL: @@ -147,7 +147,7 @@ def detect_sample_name(grib_keys, sample_name_template='{geography}_{vertical}_g elif grib_keys['typeOfLevel'] in TYPE_OF_LEVELS_ML: vertical = 'ml' else: - LOGGER.info("unknown 'typeOfLevel': %r. Using GRIB2 template", grib_keys['typeOfLevel']) + LOGGER.warning("unknown 'typeOfLevel': %r. Using GRIB2 template", grib_keys['typeOfLevel']) return 'GRIB2' sample_name = sample_name_template.format(**locals())