started to repair sfadump
[sfa.git] / sfa / plc / sfa-import-plc.py
index 18727c6..9b280ab 100755 (executable)
@@ -17,7 +17,6 @@
 import getopt
 import sys
 import tempfile
-import logging
 
 from sfa.util.record import *
 from sfa.util.table import SfaTable
@@ -64,7 +63,7 @@ def main():
     interface_hrn = config.SFA_INTERFACE_HRN
     keys_filename = config.config_path + os.sep + 'person_keys.py' 
     sfaImporter = sfaImport()
-    if config.SFA_API_DEBUG: sfaImporter.logger.setLevel(logging.DEBUG)
+    if config.SFA_API_DEBUG: sfaImporter.logger.setLevelDebug()
     shell = sfaImporter.shell
     plc_auth = sfaImporter.plc_auth 
     table = SfaTable()
@@ -138,7 +137,7 @@ def main():
     # start importing 
     for site in sites:
         site_hrn = interface_hrn + "." + site['login_base']
-        print "Importing site: %s" % site_hrn
+        sfa_logger().info("Importing site: %s" % site_hrn)
 
         # import if hrn is not in list of existing hrns or if the hrn exists
         # but its not a site record