Log en vue d'une estimation

darcs-hash:20080625172240-fbba6-2fea80d60c529ff62c029a95385c6d2ef34c1bd8.gz
This commit is contained in:
J.Benoist Leger 2008-06-25 19:22:40 +02:00
parent 0f6693f646
commit 34bd901e22

View file

@ -30,6 +30,9 @@ Calcule le co
"""
__version__ = '1'
# Début : Ajout log pour réestimer les coûts
import time
# Fin
import sys, syslog, os.path
sys.path.append('/usr/scripts/gestion')
import config
@ -43,6 +46,9 @@ log = crans.utils.logs.getFileLogger('impression')
# ######################################################## #
#
#
# Début : Ajout log pour réestimer les coûts
FICHIER_LOG="/var/log/log_couts/impressions"
# Fin
DECOUVERT_AUTHORISE = config.impression.decouvert
PAS_D_AGRAPHES = "pasdagraphes"
@ -444,6 +450,11 @@ class impression:
# options couleurs
options += LPR_OPTIONS[self._settings['couleurs']]
# Début : Ajout log pour réestimer les coûts
fichier_log_imp=open(FICHIER_LOG,"a")
fichier_log_imp.write("%d %3d %2s %s\n" % (time.time(),self._settings['copies'],self._settings['papier'],self._fichier) )
fichier_log_imp.close()
# Fin
liste_nom_fichier_pdf=(' '+escapeForShell( self._fichier ) )*self._settings['copies']
import commands