[CalendarServer-changes] [3445] CalendarServer/trunk/calendarserver/tap/caldav.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Dec 2 16:21:36 PST 2008
Revision: 3445
http://trac.macosforge.org/projects/calendarserver/changeset/3445
Author: wsanchez at apple.com
Date: 2008-12-02 16:21:36 -0800 (Tue, 02 Dec 2008)
Log Message:
-----------
No LoggingMixIn in function
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tap/caldav.py
Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py 2008-12-03 00:15:10 UTC (rev 3444)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py 2008-12-03 00:21:36 UTC (rev 3445)
@@ -49,7 +49,7 @@
from twext.internet.ssl import ChainingOpenSSLContextFactory
-from twistedcaldav.log import LoggingMixIn
+from twistedcaldav.log import Logger, LoggingMixIn
from twistedcaldav.log import logLevelForNamespace, setLogLevelForNamespace
from twistedcaldav.accesslog import DirectoryLogWrapperResource
from twistedcaldav.accesslog import RotatingFileAccessLoggingObserver
@@ -81,7 +81,9 @@
except ImportError:
NegotiateCredentialFactory = None
+log = Logger()
+
class CalDAVService (MultiService):
def __init__(self, logObserver):
self.logObserver = logObserver
@@ -315,15 +317,13 @@
# Now do any on disk upgrades we might need.
UpgradeTheServer.doUpgrade()
- serverType = config.ProcessType
+ serviceMethod = getattr(self, "makeService_%s" % (config.ProcessType,), None)
- serviceMethod = getattr(self, "makeService_%s" % (serverType,), None)
-
if not serviceMethod:
raise UsageError(
"Unknown server type %s. "
"Please choose: Master, Slave, Single or Combined"
- % (serverType,)
+ % (config.ProcessType,)
)
else:
service = serviceMethod(options)
@@ -351,7 +351,7 @@
config.reload()
# If combined service send signal to all caldavd children
- if serverType == "Combined":
+ if config.ProcessType == "Combined":
service.processMonitor.signalAll(signal.SIGHUP, "caldav")
# FIXME: There is no memcachepool.getCachePool
@@ -1123,8 +1123,8 @@
output, error = child.communicate()
if child.returncode:
- self.log_error("Could not get passphrase for %s: %s"
- % (config.SSLPrivateKey, error))
+ log.error("Could not get passphrase for %s: %s"
+ % (config.SSLPrivateKey, error))
else:
return output.strip()
@@ -1146,8 +1146,8 @@
sslPrivKey.close()
if keyType is None:
- self.log_error("Could not get private key type for %s"
- % (config.SSLPrivateKey,))
+ log.error("Could not get private key type for %s"
+ % (config.SSLPrivateKey,))
else:
child = Popen(
args=[
@@ -1160,8 +1160,8 @@
output, error = child.communicate()
if child.returncode:
- self.log_error("Could not get passphrase for %s: %s"
- % (config.SSLPrivateKey, error))
+ log.error("Could not get passphrase for %s: %s"
+ % (config.SSLPrivateKey, error))
else:
return output.strip()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081202/ffc29650/attachment.html>
More information about the calendarserver-changes
mailing list