Log en vue d'une estimation
darcs-hash:20080625172240-fbba6-2fea80d60c529ff62c029a95385c6d2ef34c1bd8.gz
This commit is contained in:
parent
0f6693f646
commit
34bd901e22
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue