--- OSAS/OSA_system/OSAS_addfiles.py 2006/06/14 16:28:12 1.47 +++ OSAS/OSA_system/OSAS_addfiles.py 2007/01/31 14:28:04 1.51 @@ -20,7 +20,14 @@ from Globals import package_home from xml.sax import make_parser from xml.sax.handler import ContentHandler import sys -import zLOG +import logging + +#ersetzt logging +def logger(txt,method,txt2): + """logging""" + logging.info(txt+ txt2) + + def spaces(depth): """needed in XMLtoTree""" @@ -337,15 +344,15 @@ class OSAS_add_contextData(Folder): urllib.urlopen(server+"/"+urlpath+"/index.meta") except: - zLOG.LOG("OSAS_addfiles (addContextData)", zLOG.INFO,"%s (%s)"%sys.exc_info()[0:2]) + logger("OSAS_addfiles (addContextData)", logging.INFO,"%s (%s)"%sys.exc_info()[0:2]) return server+"/"+urlpath+"/index.meta file has to exist!" # old version for foxridge storage viewer #links=[(path,'storage server view')] # libcoll viewer with imagepath: needs pageimg directory - links+=[('http://libcoll.mpiwg-berlin.mpg.de/libview?mode=imagepath&url=%s/pageimg'%path,'libcoll standard viewer (pageimg)')] - # libcoll viewer with imagepath: needs pageimg directory - links+=[('http://libcoll.mpiwg-berlin.mpg.de/libview?mode=texttool&url=%s'%path,'libcoll standard viewer (texttool)')] + links=[('http://libcoll.mpiwg-berlin.mpg.de/libview?mode=imagepath&url=%s/pageimg'%path,'libcoll standard viewer (pageimg)')] + # libcoll viewer with texttool: needs texttool tag + links+=[('http://libcoll.mpiwg-berlin.mpg.de/libview?mode=texttool&url=%s/index.meta'%path,'libcoll standard viewer (texttool)')] links+=OSAS_show.readContexts(path) # auslesen von contexten fuer den link #print "LINK",links @@ -392,11 +399,11 @@ class OSAS_add_contextData(Folder): try: urllib.urlopen(collection+"/"+id+"/generate_label").read() except: - zLOG.LOG("OSAS_addfiles (addContextData2,label not generated)", zLOG.INFO,"%s (%s)"%sys.exc_info()[0:2]) + logger("OSAS_addfiles (addContextData2,label not generated)", logging.INFO,"%s (%s)"%sys.exc_info()[0:2]) try: urllib.urlopen(collection+"/"+id+"/generate_title").read() except: - zLOG.LOG("OSAS_addfiles (addContextData2,title not generated)", zLOG.INFO,"%s (%s)"%sys.exc_info()[0:2]) + logger("OSAS_addfiles (addContextData2,title not generated)", logging.INFO,"%s (%s)"%sys.exc_info()[0:2]) return self.REQUEST.RESPONSE.redirect(self.REQUEST['URL2']+'?path='+path)