--- OSAS/OSA_system/OSAS_add.py 2006/07/03 17:40:18 1.48 +++ OSAS/OSA_system/OSAS_add.py 2007/01/31 14:28:04 1.50 @@ -14,7 +14,14 @@ from Products.PageTemplates.PageTemplate from Products.PageTemplates.PageTemplate import PageTemplate import string import urllib -import zLOG +import logging + +#ersetzt logging +def logger(txt,method,txt2): + """logging""" + logging.info(txt+ txt2) + + import xml.dom.minidom from time import localtime,strftime from Globals import package_home @@ -706,21 +713,21 @@ def combineTextImage2(self,path): path=re.sub('//','/',self.REQUEST['path']) # falls '//' im Pfad dlpath = re.sub('/mpiwg/online/','',path)+"/"+self.REQUEST['image'] - zLOG.LOG('OSas',zLOG.INFO,"ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=100 -sync >> /tmp/sc.out &"%dlpath ) - ret=os.popen("ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=100 -sync >> /tmp/sc.out &"%dlpath ).read() - zLOG.LOG('OSAS (combine)',zLOG.INFO,ret) + logger('OSas',logging.INFO,"ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=90 -sync >> /tmp/sc.out &"%dlpath ) + ret=os.popen("ssh archive@nausikaa2.rz-berlin.mpg.de /usr/local/mpiwg/scripts/scaleomat -src=/mpiwg/online -dest=/mpiwg/temp/online/scaled/thumb -dir=%s -scaleto=90 -sync >> /tmp/sc.out &"%dlpath ).read() + logger('OSAS (combine)',logging.INFO,ret) - else: # falls keine Bilder (bug in reg.cgi info file ersetzen) - f=file("/tmp/tmp_info.xml","w") - tmp=patchedInfoXML(self.REQUEST['path']) - f.write(tmp.encode('utf-8')) - f.close() - splitted=path.split("/") - fn=splitted[len(splitted)-1] - remotePath="archive@nausikaa2.rz-berlin.mpg.de:/usr/local/share/archimedes/web/docs/proj/echo/1/docs/"+fn+"/info.xml" - os.popen("scp /tmp/tmp_info.xml %s"%remotePath) + #else: # falls keine Bilder (bug in reg.cgi info file ersetzen) + # f=file("/tmp/tmp_info.xml","w") + # tmp=patchedInfoXML(self.REQUEST['path']) + # f.write(tmp.encode('utf-8')) + # f.close() + # splitted=path.split("/") + # fn=splitted[len(splitted)-1] + # remotePath="archive@nausikaa2.rz-berlin.mpg.de:/usr/local/share/archimedes/web/docs/proj/echo/1/docs/"+fn+"/info.xml" + # os.popen("scp /tmp/tmp_info.xml %s"%remotePath) def patchedInfoXML(path): dom=xml.dom.minidom.parse(path+"/index.meta")