Changeset 824 for pykota/trunk
- Timestamp:
- 02/27/03 23:55:20 (22 years ago)
- Location:
- pykota/trunk
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r820 r824 17 17 # 18 18 # $Log$ 19 # Revision 1.23 2003/02/27 22:55:20 jalet 20 # WARN log priority doesn't exist. 21 # 19 22 # Revision 1.22 2003/02/27 09:37:02 jalet 20 23 # Wildcards seem to work now … … 209 212 if (softlimit is not None) and (hardlimit is not None) and (hardlimit < softlimit) : 210 213 # 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") 212 215 (softlimit, hardlimit) = (hardlimit, softlimit) 213 216 if not names : -
pykota/trunk/bin/pykota
r823 r824 17 17 # 18 18 # $Log$ 19 # Revision 1.11 2003/02/27 22:55:20 jalet 20 # WARN log priority doesn't exist. 21 # 19 22 # Revision 1.10 2003/02/27 22:43:21 jalet 20 23 # Missing import … … 118 121 except PyKotaRequesterError, msg : 119 122 # 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") 121 124 printerIsOff = 1 122 125 else : … … 128 131 # The printer is unknown from the Quota Storage perspective 129 132 # 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") 131 134 else : 132 135 # get last values from Quota Storage -
pykota/trunk/pykota/loggers/system.py
r710 r824 15 15 # 16 16 # $Log$ 17 # Revision 1.3 2003/02/27 22:55:20 jalet 18 # WARN log priority doesn't exist. 19 # 17 20 # Revision 1.2 2003/02/05 23:47:54 jalet 18 21 # Forgotten default argument … … 39 42 def log_message(self, message, level="info") : 40 43 """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) 46 45 syslog.syslog(priority, message) -
pykota/trunk/pykota/tool.py
r817 r824 15 15 # 16 16 # $Log$ 17 # Revision 1.23 2003/02/27 22:55:20 jalet 18 # WARN log priority doesn't exist. 19 # 17 20 # Revision 1.22 2003/02/27 09:09:20 jalet 18 21 # Added a method to match strings against wildcard patterns … … 251 254 else : 252 255 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") 254 257 return (action, None, None) 255 258 else :