[CalendarServer-changes] [1140]
CalendarServer/trunk/twistedcaldav/tap.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Feb 6 14:13:05 PST 2007
Revision: 1140
http://trac.macosforge.org/projects/calendarserver/changeset/1140
Author: dreid at apple.com
Date: 2007-02-06 14:13:05 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
More verbose logging of server startup in the tap.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/tap.py
Modified: CalendarServer/trunk/twistedcaldav/tap.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/tap.py 2007-02-06 22:11:51 UTC (rev 1139)
+++ CalendarServer/trunk/twistedcaldav/tap.py 2007-02-06 22:13:05 UTC (rev 1140)
@@ -171,6 +171,10 @@
directories = []
directoryClass = namedClass(config.DirectoryService['type'])
+
+ log.msg("Configuring directory service of type: %s" % (
+ config.DirectoryService['type'],))
+
baseDirectory = directoryClass(**config.DirectoryService['params'])
directories.append(baseDirectory)
@@ -178,11 +182,18 @@
sudoDirectory = None
if config.SudoersFile and os.path.exists(config.SudoersFile):
+ log.msg("Configuring SudoDirectoryService with file: %s" % (
+ config.SudoersFile,))
+
sudoDirectory = SudoDirectoryService(config.SudoersFile)
sudoDirectory.realmName = baseDirectory.realmName
CalDAVResource.sudoDirectory = sudoDirectory
directories.append(sudoDirectory)
+ else:
+ log.msg(
+ "Not using SudoDirectoryService file doesn't exist: %s" % (
+ config.SudoersFile,))
directory = AggregateDirectoryService(directories)
@@ -194,7 +205,10 @@
# Setup Resource hierarchy
#
- log.msg("Setting up document root: %s" % (config.DocumentRoot,))
+ log.msg("Setting up document root at: %s" % (config.DocumentRoot,))
+
+ log.msg("Setting up principal collection: %r" % (
+ self.principalResourceClass,))
principalCollection = self.principalResourceClass(
os.path.join(config.DocumentRoot, 'principals'),
@@ -202,12 +216,17 @@
directory
)
+ log.msg("Setting up calendar collection: %r" % (
+ self.calendarResourceClass,))
+
calendarCollection = self.calendarResourceClass(
os.path.join(config.DocumentRoot, 'calendars'),
directory,
'/calendars/'
)
+ log.msg("Setting up root resource: %r" % (self.rootResourceClass,))
+
root = self.rootResourceClass(
config.DocumentRoot,
principalCollections=(principalCollection,)
@@ -218,14 +237,20 @@
# Configure default ACLs on the root resource
+ log.msg("Setting up default ACEs on root resource")
+
rootACEs = [
davxml.ACE(
davxml.Principal(davxml.All()),
davxml.Grant(davxml.Privilege(davxml.Read())),
),
]
+
+ log.msg("Setting up AdminPrincipals")
for principal in config.AdminPrincipals:
+ log.msg("Added %s as admin principal" % (principal,))
+
rootACEs.append(
davxml.ACE(
davxml.Principal(davxml.HRef(principal)),
@@ -235,6 +260,8 @@
)
)
+ log.msg("Setting root ACL")
+
root.setAccessControlList(davxml.ACL(*rootACEs))
#
@@ -249,12 +276,16 @@
realm = directory.realmName or ""
+ log.msg("Configuring authentication for realm: %s" % (realm,))
+
for scheme, schemeConfig in config.Authentication.iteritems():
scheme = scheme.lower()
credFactory = None
-
+
if schemeConfig['Enabled']:
+ log.msg("Setting up scheme: %s" % (scheme,))
+
if scheme == 'kerberos':
if not NegotiateCredentialFactory:
log.msg("Kerberos support not available")
@@ -271,9 +302,14 @@
elif scheme == 'basic':
credFactory = BasicCredentialFactory(realm)
+ else:
+ log.err("Unknown scheme: %s" % (scheme,))
+
if credFactory:
credentialFactories.append(credFactory)
+ log.msg("Configuring authentication wrapper")
+
authWrapper = auth.AuthenticationWrapper(
root,
portal,
@@ -286,8 +322,13 @@
# Configure the service
#
+ log.msg("Setting up service")
+
channel = http.HTTPFactory(site)
+ log.msg("Configuring rotating log observer for file: %s" % (
+ config.ServerLogFile,))
+
logObserver = RotatingFileAccessLoggingObserver(config.ServerLogFile)
service = CalDAVService(logObserver)
@@ -297,12 +338,18 @@
for bindAddress in config.BindAddress:
if not config.SSLOnly:
+ log.msg("Adding server at %s:%s" % (
+ bindAddress, config.Port))
+
httpService = internet.TCPServer(int(config.Port), channel,
interface=bindAddress)
httpService.setServiceParent(service)
if config.SSLEnable:
from twisted.internet.ssl import DefaultOpenSSLContextFactory
+ log.msg("Adding SSL server at %s:%s" % (
+ bindAddress, config.Port))
+
httpsService = internet.SSLServer(
int(config.SSLPort),
channel,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070206/30c39b32/attachment.html
More information about the calendarserver-changes
mailing list