Changeset 1404

Show
Ignore:
Timestamp:
09/09/08 16:03:55 (2 months ago)
Author:
sgillies
Message:

Add logging to loader

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PleiadesEntity/trunk/Extensions/loader.py

    r1401 r1404  
    3232import re 
    3333from os.path import basename 
     34import logging 
    3435 
    3536import lxml.etree as etree 
     
    110111    failures = [] 
    111112    count = 0 
     113    log = logging.getLogger("pleiades.entity") 
    112114    for xml in glob.glob("%s/*.xml" % sourcedir): 
    113115        try: 
     
    115117            count += 1 
    116118        except Exception, e: 
    117             failures.append([basename(xml), str(e)]
     119            log.error("Failed to load %s", xml, exc_info=1
    118120     
    119121    if len(failures) == 0: 
     
    469471                        featureType=placeType, 
    470472                        associationCertainty='certain', 
     473                        creators=creators, 
     474                        contributors=contributors, 
     475                        rights=rights, 
     476                        description=description, 
    471477                        ) 
    472478                f = features[fid]