updated logging usage, to use the library directly and avoid imposing a core config by default, allowing users of the core library to configure logging as desired

This commit is contained in:
bharnden 2019-02-16 09:50:19 -08:00
parent 37f747c212
commit 7aee2b2ba7
44 changed files with 552 additions and 527 deletions

View file

@ -5,7 +5,8 @@ systems. Depends on utm contributed module, from
https://pypi.python.org/pypi/utm (version 0.3.0).
"""
from core import logger
import logging
from core.enumerations import RegisterTlvs
from core.misc import utm
@ -117,7 +118,7 @@ class CoreLocation(object):
try:
lat, lon = utm.to_latlon(e, n, zone[0], zone[1])
except utm.OutOfRangeError:
logger.exception("UTM out of range error for n=%s zone=%s xyz=(%s,%s,%s)", n, zone, x, y, z)
logging.exception("UTM out of range error for n=%s zone=%s xyz=(%s,%s,%s)", n, zone, x, y, z)
lat, lon = self.refgeo[:2]
# self.info("getgeo(%s,%s,%s) e=%s n=%s zone=%s lat,lon,alt=" \
# "%.3f,%.3f,%.3f" % (x, y, z, e, n, zone, lat, lon, alt))