Skip to content

Commit

Permalink
#464 usage of lagger in nansat.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aanersc committed Mar 3, 2021
1 parent c9d427b commit 74b45bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nansat/nansat.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def list_bands(self, do_print=True):
outString += ' %s: %s\n' % (i, bands[b][i])
if do_print:
# print to screeen
print(outString)
self.logger.info(outString)
else:
return outString

Expand Down Expand Up @@ -970,8 +970,8 @@ def write_geotiffimage(self, filename, band_id=1):
outDataset.GetRasterBand(1).SetColorTable(colorTable)
except:
# Happens after reprojection, a possible bug?
print('Could not set color table')
print(colorTable)
self.logger.warning('Could not set color table %s' % colorTable)

outDataset = None
self.vrt.copyproj(filename)

Expand Down Expand Up @@ -1585,7 +1585,7 @@ def _import_mappers(log_level=None):
value: class Mapper(VRT) from the mappers module
"""
logger = add_logger('import_mappers', logLevel=log_level)
logger = add_logger('Nansat', logLevel=log_level)
# import built-in mappers
import nansat.mappers
mapper_packages = [nansat.mappers]
Expand Down

0 comments on commit 74b45bd

Please sign in to comment.