[CalendarServer-changes] [11456] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jul 3 12:24:00 PDT 2013
Revision: 11456
http://trac.calendarserver.org//changeset/11456
Author: sagen at apple.com
Date: 2013-07-03 12:24:00 -0700 (Wed, 03 Jul 2013)
Log Message:
-----------
Logging fixes
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/agent.py
CalendarServer/trunk/twext/web2/dav/method/acl.py
CalendarServer/trunk/twext/web2/dav/method/propfind.py
CalendarServer/trunk/twext/web2/dav/method/proppatch.py
CalendarServer/trunk/twistedcaldav/method/mkcalendar.py
CalendarServer/trunk/twistedcaldav/method/mkcol.py
CalendarServer/trunk/twistedcaldav/method/propfind.py
CalendarServer/trunk/twistedcaldav/stdconfig.py
Modified: CalendarServer/trunk/calendarserver/tools/agent.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/agent.py 2013-07-03 19:17:05 UTC (rev 11455)
+++ CalendarServer/trunk/calendarserver/tools/agent.py 2013-07-03 19:24:00 UTC (rev 11456)
@@ -108,7 +108,7 @@
else:
log.error("Failed digest auth with response: %s" % (response,))
return fail(UnauthorizedLogin())
- except self.directoryModule.ODNSerror as e:
+ except Exception as e:
log.error(
"OpenDirectory error while performing digest authentication for user %s: %s"
% (credentials.username, e)
Modified: CalendarServer/trunk/twext/web2/dav/method/acl.py
===================================================================
--- CalendarServer/trunk/twext/web2/dav/method/acl.py 2013-07-03 19:17:05 UTC (rev 11455)
+++ CalendarServer/trunk/twext/web2/dav/method/acl.py 2013-07-03 19:24:00 UTC (rev 11456)
@@ -73,7 +73,7 @@
#
if doc is None:
error = "Request XML body is required."
- log.error(error)
+ log.error("Error: {err}", err=error)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, error))
#
@@ -83,7 +83,7 @@
if not isinstance(acl, davxml.ACL):
error = ("Request XML body must be an acl element."
% (davxml.PropertyUpdate.sname(),))
- log.error(error)
+ log.error("Error: {err}", err=error)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, error))
#
Modified: CalendarServer/trunk/twext/web2/dav/method/propfind.py
===================================================================
--- CalendarServer/trunk/twext/web2/dav/method/propfind.py 2013-07-03 19:17:05 UTC (rev 11455)
+++ CalendarServer/trunk/twext/web2/dav/method/propfind.py 2013-07-03 19:24:00 UTC (rev 11456)
@@ -84,7 +84,7 @@
if not isinstance(find, davxml.PropertyFind):
error = ("Non-%s element in PROPFIND request body: %s"
% (davxml.PropertyFind.sname(), find))
- log.error(error)
+ log.error("Error: {err}", err=error)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, error))
container = find.children[0]
Modified: CalendarServer/trunk/twext/web2/dav/method/proppatch.py
===================================================================
--- CalendarServer/trunk/twext/web2/dav/method/proppatch.py 2013-07-03 19:17:05 UTC (rev 11455)
+++ CalendarServer/trunk/twext/web2/dav/method/proppatch.py 2013-07-03 19:24:00 UTC (rev 11456)
@@ -67,7 +67,7 @@
if doc is None:
error = "Request XML body is required."
- log.error(error)
+ log.error("Error: {err}", error)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, error))
#
@@ -77,7 +77,7 @@
if not isinstance(update, davxml.PropertyUpdate):
error = ("Request XML body must be a propertyupdate element."
% (davxml.PropertyUpdate.sname(),))
- log.error(error)
+ log.error("Error: {err}", error)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, error))
responses = PropertyStatusResponseQueue("PROPPATCH", request.uri, responsecode.NO_CONTENT)
Modified: CalendarServer/trunk/twistedcaldav/method/mkcalendar.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/mkcalendar.py 2013-07-03 19:17:05 UTC (rev 11455)
+++ CalendarServer/trunk/twistedcaldav/method/mkcalendar.py 2013-07-03 19:24:00 UTC (rev 11456)
@@ -83,7 +83,7 @@
if not isinstance(makecalendar, caldavxml.MakeCalendar):
error = ("Non-%s element in MKCALENDAR request body: %s"
% (caldavxml.MakeCalendar.name, makecalendar))
- log.error(error)
+ log.error("Error: {err}", err=error)
raise HTTPError(StatusResponse(responsecode.UNSUPPORTED_MEDIA_TYPE, error))
errors = PropertyStatusResponseQueue("PROPPATCH", request.uri, responsecode.NO_CONTENT)
Modified: CalendarServer/trunk/twistedcaldav/method/mkcol.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/mkcol.py 2013-07-03 19:17:05 UTC (rev 11455)
+++ CalendarServer/trunk/twistedcaldav/method/mkcol.py 2013-07-03 19:24:00 UTC (rev 11456)
@@ -118,7 +118,7 @@
if not isinstance(mkcol, mkcolxml.MakeCollection):
error = ("Non-%s element in MKCOL request body: %s"
% (mkcolxml.MakeCollection.name, mkcol))
- log.error(error)
+ log.error("Error: {err}", err=error)
raise HTTPError(StatusResponse(responsecode.UNSUPPORTED_MEDIA_TYPE, error))
errors = PropertyStatusResponseQueue("PROPPATCH", request.uri, responsecode.NO_CONTENT)
@@ -135,7 +135,7 @@
if isinstance(property, davxml.ResourceType):
if rtype:
error = "Multiple {DAV:}resourcetype properties in MKCOL request body: %s" % (mkcol,)
- log.error(error)
+ log.error("Error: {err}", err=error)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, error))
else:
if property.childrenOfType(davxml.Collection):
@@ -146,18 +146,18 @@
if not rtype:
error = "No {DAV:}resourcetype property in MKCOL request body: %s" % (mkcol,)
- log.error(error)
+ log.error("Error: {err}", err=error)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, error))
elif rtype not in ("calendar", "addressbook"):
error = "{DAV:}resourcetype property in MKCOL request body not supported: %s" % (mkcol,)
- log.error(error)
+ log.error("Error: {err}", err=error)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, error))
# Make sure feature is enabled
if (rtype == "calendar" and not config.EnableCalDAV or
rtype == "addressbook" and not config.EnableCardDAV):
error = "{DAV:}resourcetype property in MKCOL request body not supported: %s" % (mkcol,)
- log.error(error)
+ log.error("Error: {err}", err=error)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, error))
# Now create the special collection
Modified: CalendarServer/trunk/twistedcaldav/method/propfind.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/propfind.py 2013-07-03 19:17:05 UTC (rev 11455)
+++ CalendarServer/trunk/twistedcaldav/method/propfind.py 2013-07-03 19:24:00 UTC (rev 11456)
@@ -85,7 +85,7 @@
if not isinstance(find, davxml.PropertyFind):
error = ("Non-%s element in PROPFIND request body: %s"
% (davxml.PropertyFind.sname(), find))
- log.error(error)
+ log.error("Error: {err}", err=error)
raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, error))
container = find.children[0]
Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py 2013-07-03 19:17:05 UTC (rev 11455)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py 2013-07-03 19:24:00 UTC (rev 11456)
@@ -1028,7 +1028,7 @@
log.info("Adding configuration from file: '%s'" % (path,))
mergeData(configDict, additionalDict)
else:
- log.warn("Missing configuration file: '%s'" % (path,))
+ log.debug("Missing configuration file: '%s'" % (path,))
return configDict
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130703/dde47ee4/attachment-0001.html>
More information about the calendarserver-changes
mailing list