Skip to content

Commit

Permalink
Merge pull request #158 from b8raoult/master
Browse files Browse the repository at this point in the history
Change logging to be more quiet
  • Loading branch information
alexamici committed Sep 15, 2020
2 parents 958523e + bd472f1 commit d335bb0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cfgrib/bindings.py
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cfgrib/dataset.py
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions cfgrib/xarray_to_grib.py
Expand Up @@ -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:
Expand All @@ -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())
Expand Down

0 comments on commit d335bb0

Please sign in to comment.