Changeset 824 for pykota/trunk

Show
Ignore:
Timestamp:
02/27/03 23:55:20 (22 years ago)
Author:
jalet
Message:

WARN log priority doesn't exist.

Location:
pykota/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/edpykota

    r820 r824  
    1717# 
    1818# $Log$ 
     19# Revision 1.23  2003/02/27 22:55:20  jalet 
     20# WARN log priority doesn't exist. 
     21# 
    1922# Revision 1.22  2003/02/27 09:37:02  jalet 
    2023# Wildcards seem to work now 
     
    209212        if (softlimit is not None) and (hardlimit is not None) and (hardlimit < softlimit) :         
    210213            # error, exchange them 
    211             self.logger.log_message(_("Hard limit %i is less than soft limit %i, values will be exchanged.") % (hardlimit, softlimit), "warn") 
     214            self.logger.log_message(_("Hard limit %i is less than soft limit %i, values will be exchanged.") % (hardlimit, softlimit), "info") 
    212215            (softlimit, hardlimit) = (hardlimit, softlimit) 
    213216        if not names :     
  • pykota/trunk/bin/pykota

    r823 r824  
    1717# 
    1818# $Log$ 
     19# Revision 1.11  2003/02/27 22:55:20  jalet 
     20# WARN log priority doesn't exist. 
     21# 
    1922# Revision 1.10  2003/02/27 22:43:21  jalet 
    2023# Missing import 
     
    118121    except PyKotaRequesterError, msg : 
    119122        # can't get actual page counter, assume printer is off, but warns in log 
    120         kotafilter.logger.log_message(msg, "warn") 
     123        kotafilter.logger.log_message(msg, "err") 
    121124        printerIsOff = 1 
    122125    else :     
     
    128131        # The printer is unknown from the Quota Storage perspective 
    129132        # we let the job pass through, but log a warning message 
    130         kotafilter.logger.log_message(_("Printer %s not registered in the PyKota system") % kotafilter.printername, "warn") 
     133        kotafilter.logger.log_message(_("Printer %s not registered in the PyKota system") % kotafilter.printername, "info") 
    131134    else :     
    132135        # get last values from Quota Storage 
  • pykota/trunk/pykota/loggers/system.py

    r710 r824  
    1515# 
    1616# $Log$ 
     17# Revision 1.3  2003/02/27 22:55:20  jalet 
     18# WARN log priority doesn't exist. 
     19# 
    1720# Revision 1.2  2003/02/05 23:47:54  jalet 
    1821# Forgotten default argument 
     
    3942    def log_message(self, message, level="info") : 
    4043        """Sends the message to syslog.""" 
    41         try : 
    42             priority = getattr(syslog, "LOG_%s" % level.upper()) 
    43         except AttributeError :     
    44             # Bad priority name, we log this as a DEBUG message 
    45             priority = syslog.LOG_DEBUG 
     44        priority = getattr(syslog, "LOG_%s" % level.upper(), syslog.LOG_DEBUG) 
    4645        syslog.syslog(priority, message) 
  • pykota/trunk/pykota/tool.py

    r817 r824  
    1515# 
    1616# $Log$ 
     17# Revision 1.23  2003/02/27 22:55:20  jalet 
     18# WARN log priority doesn't exist. 
     19# 
    1720# Revision 1.22  2003/02/27 09:09:20  jalet 
    1821# Added a method to match strings against wildcard patterns 
     
    251254            else :     
    252255                action = "DENY" 
    253             self.logger.log_message(_("Unable to match user %s on printer %s, applying default policy (%s)") % (username, printername, action), "warn") 
     256            self.logger.log_message(_("Unable to match user %s on printer %s, applying default policy (%s)") % (username, printername, action), "info") 
    254257            return (action, None, None) 
    255258        else :