[CalendarServer-changes] [12053] CalendarServer/trunk/twext/python/log.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:22:22 PDT 2014
Revision: 12053
http://trac.calendarserver.org//changeset/12053
Author: wsanchez at apple.com
Date: 2013-12-12 09:57:30 -0800 (Thu, 12 Dec 2013)
Log Message:
-----------
Add critical log level.
Modified Paths:
--------------
CalendarServer/trunk/twext/python/log.py
Modified: CalendarServer/trunk/twext/python/log.py
===================================================================
--- CalendarServer/trunk/twext/python/log.py 2013-12-11 23:31:37 UTC (rev 12052)
+++ CalendarServer/trunk/twext/python/log.py 2013-12-12 17:57:30 UTC (rev 12053)
@@ -83,10 +83,14 @@
from twisted.python.log import addObserver, removeObserver
from twisted.python.log import ILogObserver as ILegacyLogObserver
+
+
OBSERVER_REMOVED = (
"Temporarily removing observer {observer} due to exception: {e}"
)
+
+
#
# Log level definitions
#
@@ -125,9 +129,10 @@
etc.
"""
debug = NamedConstant()
- info = NamedConstant()
- warn = NamedConstant()
+ info = NamedConstant()
+ warn = NamedConstant()
error = NamedConstant()
+ critical = NamedConstant()
@classmethod
def levelWithName(cls, name):
@@ -166,10 +171,10 @@
#
pythonLogLevelMapping = {
LogLevel.debug: logging.DEBUG,
- LogLevel.info: logging.INFO,
- LogLevel.warn: logging.WARNING,
+ LogLevel.info: logging.INFO,
+ LogLevel.warn: logging.WARNING,
LogLevel.error: logging.ERROR,
- # LogLevel.critical: logging.CRITICAL,
+ LogLevel.critical: logging.CRITICAL,
}
@@ -563,9 +568,9 @@
"""
Predicate results.
"""
- yes = NamedConstant() # Log this
- no = NamedConstant() # Don't log this
- maybe = NamedConstant() # No opinion
+ yes = NamedConstant() # Log this
+ no = NamedConstant() # Don't log this
+ maybe = NamedConstant() # No opinion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/744d3a69/attachment.html>
More information about the calendarserver-changes
mailing list