Index: pykota/trunk/bin/cupspykota
===================================================================
--- pykota/trunk/bin/cupspykota (revision 1819)
+++ pykota/trunk/bin/cupspykota (revision 1820)
@@ -24,4 +24,8 @@
 #
 # $Log$
+# Revision 1.74  2004/10/13 20:51:27  jalet
+# Made debugging levels be the same in cupspykota and lprngpykota.
+# Now outputs more information in informational messages : user, printer, jobid
+#
 # Revision 1.73  2004/10/13 16:56:45  jalet
 # Added a space to the pattern to differentiate jobs which id begins with
@@ -410,5 +414,5 @@
             # we deny the job in this case (nothing to print anyway)
             if not self.jobSizeBytes :
-                self.printInfo(_("Job contains no data. Printing is denied."), "warn")
+                self.printMoreInfo(user, printer, _("Job contains no data. Printing is denied."), "warn")
                 action = "DENY"
             else :    
@@ -422,5 +426,5 @@
             self.prehook(userpquota)
             
-            self.printInfo(_("Job accounting begins."))
+            self.printMoreInfo(user, printer, _("Job accounting begins."))
             self.accounter.beginJob(printer)
         else :    
@@ -443,13 +447,13 @@
             # stops accounting. 
             self.accounter.endJob(printer)
-            self.printInfo(_("Job accounting ends."))
+            self.printMoreInfo(user, printer, _("Job accounting ends."))
                 
             # retrieve the job size    
             if action == "DENY" :
                 jobsize = 0
-                self.printInfo(_("Job size forced to 0 because printing is denied."))
+                self.printMoreInfo(user, printer, _("Job size forced to 0 because printing is denied."))
             else :    
                 jobsize = self.accounter.getJobSize(printer)
-            self.printInfo(_("Job size : %i") % jobsize)
+            self.printMoreInfo(user, printer, _("Job size : %i") % jobsize)
             
             # update the quota for the current user on this printer 
@@ -459,5 +463,5 @@
             # adds the current job to history    
             printer.addJobToHistory(self.jobid, user, self.accounter.getLastPageCounter(), action, jobsize, jobprice, self.preserveinputfile, self.title, self.copies, self.options, clienthost, self.jobSizeBytes)
-            self.printInfo(_("Job added to history."))
+            self.printMoreInfo(user, printer, _("Job added to history."))
             
             # exports some new environment variables
Index: pykota/trunk/bin/lprngpykota
===================================================================
--- pykota/trunk/bin/lprngpykota (revision 1713)
+++ pykota/trunk/bin/lprngpykota (revision 1820)
@@ -24,4 +24,8 @@
 #
 # $Log$
+# Revision 1.8  2004/10/13 20:51:27  jalet
+# Made debugging levels be the same in cupspykota and lprngpykota.
+# Now outputs more information in informational messages : user, printer, jobid
+#
 # Revision 1.7  2004/09/13 16:02:44  jalet
 # Added fix for incorrect job's size when hardware accounting fails
@@ -126,5 +130,5 @@
         # we deny the job in this case (nothing to print anyway)
         if not self.jobSizeBytes :
-            self.printInfo(_("Job contains no data. Printing is denied."), "warn")
+            self.printMoreInfo(user, printer, _("Job contains no data. Printing is denied."), "warn")
             action = "DENY"
         else :    
@@ -138,5 +142,5 @@
         self.prehook(userpquota)
         
-        self.logdebug("Job accounting begins.")
+        self.printMoreInfo(user, printer, _("Job accounting begins."))
         self.accounter.beginJob(printer)
         
@@ -145,18 +149,18 @@
             self.accounter.endJob(printer)
             jobsize = self.accounter.getJobSize(printer)
-            self.logdebug("Job accounting ends.")
+            self.printMoreInfo(user, printer, _("Job accounting ends."))
             
         if action == "DENY" :   
             jobsize = 0
-            self.logdebug("Job size forced to 0 because printing was denied.")
+            self.printMoreInfo(user, printer, _("Job size forced to 0 because printing is denied."))
             
         if (self.accounter.isSoftware) or (action == "DENY") :    
             # update the quota for the current user on this printer 
-            self.logdebug("Job size : %i" % jobsize)
+            self.printMoreInfo(user, printer, _("Job size : %i") % jobsize)
             self.logdebug("Updating user %s's quota on printer %s" % (user.Name, printer.Name))
             jobprice = userpquota.increasePagesUsage(jobsize)
             
             printer.addJobToHistory(self.jobid, user, self.accounter.getLastPageCounter(), action, jobsize, jobprice, self.preserveinputfile, self.title, self.copies, self.options, clienthost, self.jobSizeBytes)
-            self.logdebug("Job added to history.")
+            self.printMoreInfo(user, printer, _("Job added to history."))
             
             # exports some new environment variables
@@ -189,9 +193,9 @@
             # in second pass, so all work is already done, 
             # now we just have to exit successfully
-            self.printInfo(_("Software accounting already done in first pass. Ignoring."))
+            self.printMoreInfo(user, printer, _("Software accounting already done in first pass. Ignoring."))
         elif printer.LastJob.JobAction == "DENY" :
             # Hardware accounting method was used, but job
             # was rejected during first pass, so nothing to do
-            self.printInfo(_("Hardware accounting already done in first pass. Ignoring."))
+            self.printMoreInfo(user, printer, _("Hardware accounting already done in first pass. Ignoring."))
         else :    
             # here if user and userpquota are both None
@@ -221,10 +225,10 @@
             jobsize = self.accounter.getJobSize(printer)
             
-            self.logdebug("Job size : %i" % jobsize)
-            self.logdebug("Updating user %s's quota on printer %s" % (user.Name, printer.Name))
+            self.printMoreInfo(user, printer, _("Job size : %i") % jobsize)
+            self.printInfo(_("Updating user %s's quota on printer %s") % (user.Name, printer.Name))
             jobprice = userpquota.increasePagesUsage(jobsize)
             
             self.storage.writeLastJobSize(printer.LastJob, jobsize, jobprice)
-            self.logdebug("Job size and price now set in history.")
+            self.printMoreInfo(user, printer, _("Job size and price now set in history."))
             
             # exports some new environment variables
