Plus de log access (apache x'en charge) + amlioration des log intranet
darcs-hash:20061120130620-f46e9-bd15d792ac8ae0785f0d233172090e6d975e43e8.gz
This commit is contained in:
parent
2aa2d53be7
commit
191bf79296
5 changed files with 38 additions and 30 deletions
|
@ -3,7 +3,7 @@ import cherrypy, tempfile, shutil, os
|
|||
import crans.impression
|
||||
import crans.impression.digicode
|
||||
import crans.impression.etat_imprimante
|
||||
|
||||
import crans.cp
|
||||
FILE_UPLOAD_BASE_FOLDER = cherrypy.config.get('fileUpload.folder', "/var/impression/fichiers/")
|
||||
|
||||
class FileError(Exception):
|
||||
|
@ -81,7 +81,7 @@ class root:
|
|||
listeBrute = [item[0] for item in listeBrute if item[2] == cherrypy.session['uid']]
|
||||
return {'codes': listeBrute}
|
||||
except Exception, e:
|
||||
cherrypy.log('erreur lors de la creation de la liste de codes :' + str(e), 'IMPRESSION', 1)
|
||||
crans.cp.log('erreur lors de la creation de la liste de codes :' + str(e), 'IMPRESSION', 1)
|
||||
return {'erreur':str(e)}
|
||||
codeList.exposed= True
|
||||
|
||||
|
@ -94,10 +94,10 @@ class root:
|
|||
cherrypy.session['impression'] = crans.impression.impression(filepath, cherrypy.session['uid'])
|
||||
return {'nbPages': cherrypy.session['impression'].pages()}
|
||||
except crans.impression.FichierInvalide, e:
|
||||
cherrypy.log("useFile : %s (%s)" % (str(e), e.file()), 'IMPRESSION', 1)
|
||||
crans.cp.log("useFile : %s (%s)" % (str(e), e.file()), 'IMPRESSION', 1)
|
||||
return {'erreur':str(e) }
|
||||
except Exception, e:
|
||||
cherrypy.log("useFile : %s" % str(e), 'IMPRESSION', 1)
|
||||
crans.cp.log("useFile : %s" % str(e), 'IMPRESSION', 1)
|
||||
return {'erreur':str(e) }
|
||||
useFile.exposed= True
|
||||
|
||||
|
@ -109,7 +109,7 @@ class root:
|
|||
try:
|
||||
nouvPrix = cherrypy.session['impression'].changeSettings(papier=papier, couleurs=couleurs, agraphes=agrafes, recto_verso=recto_verso, copies=int(copies))
|
||||
except Exception, e:
|
||||
cherrypy.log("changeSettings : %s" % str(e), 'IMPRESSION', 1)
|
||||
crans.cp.log("changeSettings : %s" % str(e), 'IMPRESSION', 1)
|
||||
return {"erreur":str(e)}
|
||||
return {'nouvPrix':nouvPrix}
|
||||
changeSettings.exposed = True
|
||||
|
@ -124,9 +124,9 @@ class root:
|
|||
except crans.impression.SoldeInsuffisant:
|
||||
return {"SoldeInsuffisant":1}
|
||||
except Exception, e:
|
||||
cherrypy.log("lancerImpression : %s" % str(e), 'IMPRESSION', 1)
|
||||
crans.cp.log("lancerImpression : %s" % str(e), 'IMPRESSION', 1)
|
||||
return {"erreur":str(e)}
|
||||
cherrypy.log("impression", 'IMPRESSION')
|
||||
crans.cp.log("impression", 'IMPRESSION')
|
||||
return {'code':str(crans.impression.digicode.gen_code(cherrypy.session['uid'])) + "#"}
|
||||
lancerImpression.exposed = True
|
||||
|
||||
|
@ -190,7 +190,7 @@ class root:
|
|||
os.makedirs(file_folder)
|
||||
newFilePath = os.path.join(file_folder, aFile.filename)
|
||||
shutil.move(tempFileName, newFilePath)
|
||||
cherrypy.log("New file uploaded at : %s" % newFilePath, "IMPRESSION")
|
||||
crans.cp.log("New file uploaded at : %s" % newFilePath, "IMPRESSION")
|
||||
return newFilePath
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue