File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ VERSION 2.X.X
9
9
Improvements:
10
10
* Simplified setup and deployment (@mwtoews)
11
11
* Faster shape access when missing shx file
12
+ * Switch to named logger (see #240)
12
13
13
14
Bug fixes:
14
15
* More robust handling of corrupt shapefiles (fixes #235)
Original file line number Diff line number Diff line change 20
20
from datetime import date
21
21
import zipfile
22
22
23
+ # Create named logger
24
+ logger = logging .getLogger (__name__ )
25
+
23
26
24
27
# Module settings
25
28
VERBOSE = True
@@ -568,13 +571,13 @@ def __geo_interface__(self):
568
571
but the Shape contained interior holes (defined by counter-clockwise orientation in the shapefile format) that were \
569
572
orphaned, i.e. not contained by any exterior rings. The rings were still included but were \
570
573
encoded as GeoJSON exterior rings instead of holes.'
571
- logging .warning (msg )
574
+ logger .warning (msg )
572
575
only_holes = self ._errors .get ('polygon_only_holes' , None )
573
576
if only_holes :
574
577
msg = header + 'Shapefile format requires that polygons contain at least one exterior ring, \
575
578
but the Shape was entirely made up of interior holes (defined by counter-clockwise orientation in the shapefile format). The rings were \
576
579
still included but were encoded as GeoJSON exterior rings instead of holes.'
577
- logging .warning (msg )
580
+ logger .warning (msg )
578
581
579
582
# return as geojson
580
583
if len (polys ) == 1 :
@@ -904,7 +907,7 @@ class ShapefileException(Exception):
904
907
# if len(messages) > 1:
905
908
# # more than just the "Summary of..." header
906
909
# msg = '\n'.join(messages)
907
- # logging .warning(msg)
910
+ # logger .warning(msg)
908
911
909
912
class Reader (object ):
910
913
"""Reads the three files of a shapefile as a unit or
You can’t perform that action at this time.
0 commit comments