new parser class structure
[logparse.git] / logparse / util.py
index 2f306378e4013fdf99e4e4d59063ab810bec5b22..8f905f470b297dcf2d60d5c4722f3641267dba52 100644 (file)
@@ -16,7 +16,7 @@ logger = logging.getLogger(__name__)
 
 from pkg_resources import Requirement, resource_filename
 
-from . import config
+from logparse import config
 
 def hostname(path): # get the hostname of current server
     hnfile = open(path, 'r')
@@ -40,7 +40,7 @@ def resolve(ip, fqdn=None):        # try to resolve an ip to hostname
     # resolve-domains defined in individual sections of the config take priority over global config
     
     if not fqdn:
-        fqdn = config.prefs['resolve-domains']
+        fqdn = config.prefs.get("logparse", "resolve-domains")
 
     if fqdn == 'ip':
         return(ip)