Cfr #983 (comment)
Currently, Shapely provides logging functionality. You can do:
import logging
logger = logging.getLogger('shapely.geos')
from
https://github.com/Toblerity/Shapely/blob/1d734def727553e271481e8cf71f9ea8ba14bab9/shapely/geos.py#L22
in geos.py, it logs:
- debug information about which GEOS library is found and loaded
- error/notice messages from GEOS (using GEOS' error/notice handlers that can be registered)
At the moment PyGEOS doesn't provide any logging functionality. But so we should discuss how valuable / important this logging functionality is, and whether we want to keep this functionality in Shapely 2.0 or not (I never used this logging myself, so I don't really know in what situations it is being used and hard to judge this myself).
For the two types of logged information in the list above, in pygeos/Shapely 2.0:
- Since finding the GEOS library is no longer done with custom logic in python (but the package is built against GEOS), this type of logging might no longer be relevant?
(eg I think fiona, which uses logging extensively to log interaction with GDAL during runtime, and which is built against GDAL and not using ctypes, doesn't do any logging related to this)
- The error/notice messages from GEOS are already turned into python exceptions and warnings (currently in pygeos, see https://github.com/pygeos/pygeos/blob/master/src/geos.h)
So this seems to make logging superfluous for PyGEOS/Shapely 2.0?
cc @sgillies @mwtoews @caspervdw @brendan-ward
Cfr #983 (comment)
Currently, Shapely provides logging functionality. You can do:
from
https://github.com/Toblerity/Shapely/blob/1d734def727553e271481e8cf71f9ea8ba14bab9/shapely/geos.py#L22
in
geos.py, it logs:At the moment PyGEOS doesn't provide any logging functionality. But so we should discuss how valuable / important this logging functionality is, and whether we want to keep this functionality in Shapely 2.0 or not (I never used this logging myself, so I don't really know in what situations it is being used and hard to judge this myself).
For the two types of logged information in the list above, in pygeos/Shapely 2.0:
(eg I think fiona, which uses logging extensively to log interaction with GDAL during runtime, and which is built against GDAL and not using ctypes, doesn't do any logging related to this)
So this seems to make logging superfluous for PyGEOS/Shapely 2.0?
cc @sgillies @mwtoews @caspervdw @brendan-ward