Changeset 1536

Show
Ignore:
Timestamp:
06/11/04 00:42:06 (20 years ago)
Author:
jalet
Message:

Better messages in logs

Location:
pykota/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/NEWS

    r1532 r1536  
    2222PyKota NEWS : 
    2323 
     24    - 1.19alpha20 : 
     25     
     26        - More complete logging messages wrt accounters. 
     27         
    2428    - 1.19alpha19 : 
    2529     
  • pykota/trunk/pykota/accounters/hardware.py

    r1495 r1536  
    2222# 
    2323# $Log$ 
     24# Revision 1.5  2004/06/10 22:42:06  jalet 
     25# Better messages in logs 
     26# 
    2427# Revision 1.4  2004/05/24 22:45:49  jalet 
    2528# New 'enforcement' directive added 
     
    103106        if printer is None : 
    104107            raise PyKotaAccounterError, _("Unknown printer address in HARDWARE(%s) for printer %s") % (commandline, self.filter.printername) 
     108        self.filter.logger.log_message(_("Launching HARDWARE(%s)...") % commandline, "info") 
    105109        error = 1 
    106110        pagecounter = None 
    107111        child = popen2.Popen4(commandline)     
    108112        try : 
    109             pagecounter = int(child.fromchild.readline().strip()) 
     113            line = child.fromchild.readline() 
     114            pagecounter = int(line.strip()) 
    110115        except ValueError :     
    111             pass 
     116            self.filter.logger.log_message(_("Incorrect answer : %s") % repr(line), "error") 
    112117        except IOError :     
    113118            # we were interrupted by a signal, certainely a SIGTERM 
  • pykota/trunk/pykota/accounters/software.py

    r1514 r1536  
    2222# 
    2323# $Log$ 
     24# Revision 1.5  2004/06/10 22:42:06  jalet 
     25# Better messages in logs 
     26# 
    2427# Revision 1.4  2004/06/02 21:51:14  jalet 
    2528# Moved the sigterm capturing elsewhere 
     
    4649    def computeJobSize(self) :     
    4750        """Feeds an external command with our datas to let it compute the job size, and return its value.""" 
    48         self.filter.logdebug("Launching software accounter %s" % self.arguments) 
     51        self.filter.logger.log_message(_("Launching SOFTWARE(%s)...") % self.arguments, "info") 
    4952        MEGABYTE = 1024*1024 
    5053        self.filter.jobdatastream.seek(0) 
  • pykota/trunk/pykota/version.py

    r1526 r1536  
    2222# 
    2323 
    24 __version__ = "1.19alpha19_unofficial" 
     24__version__ = "1.19alpha20_unofficial" 
    2525 
    2626__doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""