[CalendarServer-changes] [6063] CalendarServer/branches/users/glyph/sql-store
source_changes at macosforge.org
source_changes at macosforge.org
Wed Aug 11 15:58:58 PDT 2010
Revision: 6063
http://trac.macosforge.org/projects/calendarserver/changeset/6063
Author: sagen at apple.com
Date: 2010-08-11 15:58:57 -0700 (Wed, 11 Aug 2010)
Log Message:
-----------
Tell postgres to log into LogRoot/postgres.log
Modified Paths:
--------------
CalendarServer/branches/users/glyph/sql-store/calendarserver/tap/caldav.py
CalendarServer/branches/users/glyph/sql-store/calendarserver/tap/util.py
CalendarServer/branches/users/glyph/sql-store/twistedcaldav/stdconfig.py
CalendarServer/branches/users/glyph/sql-store/txdav/datastore/subpostgres.py
Modified: CalendarServer/branches/users/glyph/sql-store/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/branches/users/glyph/sql-store/calendarserver/tap/caldav.py 2010-08-11 22:41:13 UTC (rev 6062)
+++ CalendarServer/branches/users/glyph/sql-store/calendarserver/tap/caldav.py 2010-08-11 22:58:57 UTC (rev 6063)
@@ -715,7 +715,7 @@
return monitor
PostgresService(dbRoot, subServiceFactory, v1_schema,
- "caldav").setServiceParent(s)
+ "caldav", logFile=config.PostgresLogFile).setServiceParent(s)
else:
monitor.setServiceParent(s)
Modified: CalendarServer/branches/users/glyph/sql-store/calendarserver/tap/util.py
===================================================================
--- CalendarServer/branches/users/glyph/sql-store/calendarserver/tap/util.py 2010-08-11 22:41:13 UTC (rev 6062)
+++ CalendarServer/branches/users/glyph/sql-store/calendarserver/tap/util.py 2010-08-11 22:58:57 UTC (rev 6063)
@@ -292,7 +292,8 @@
if config.UseDatabase:
_dbRoot = CachingFilePath(config.DatabaseRoot)
- _postgresService = PostgresService(_dbRoot, None, v1_schema, "caldav")
+ _postgresService = PostgresService(_dbRoot, None, v1_schema, "caldav",
+ logFile=config.PostgresLogFile)
_newStore = PostgresStore(_postgresService.produceConnection,
notifierFactory, # config.EnableCalDAV, config.EnableCardDAV)
_dbRoot.child("attachments"))
Modified: CalendarServer/branches/users/glyph/sql-store/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/branches/users/glyph/sql-store/twistedcaldav/stdconfig.py 2010-08-11 22:41:13 UTC (rev 6062)
+++ CalendarServer/branches/users/glyph/sql-store/twistedcaldav/stdconfig.py 2010-08-11 22:58:57 UTC (rev 6063)
@@ -269,6 +269,7 @@
"ErrorLogEnabled" : True, # True = use log file, False = stdout
"ErrorLogRotateMB" : 10, # Rotate error log after so many megabytes
"ErrorLogMaxRotatedFiles" : 5, # Retain this many error log files
+ "PostgresLogFile" : "postgres.log", # Postgres log
"PIDFile" : "caldavd.pid",
"RotateAccessLog" : False,
"EnableExtendedAccessLog": True,
@@ -634,6 +635,7 @@
("ConfigRoot", "SudoersFile"),
("LogRoot", "AccessLogFile"),
("LogRoot", "ErrorLogFile"),
+ ("LogRoot", "PostgresLogFile"),
("LogRoot", "AccountingLogRoot"),
("RunRoot", "PIDFile"),
("RunRoot", "GlobalStatsSocket"),
Modified: CalendarServer/branches/users/glyph/sql-store/txdav/datastore/subpostgres.py
===================================================================
--- CalendarServer/branches/users/glyph/sql-store/txdav/datastore/subpostgres.py 2010-08-11 22:41:13 UTC (rev 6062)
+++ CalendarServer/branches/users/glyph/sql-store/txdav/datastore/subpostgres.py 2010-08-11 22:58:57 UTC (rev 6063)
@@ -159,7 +159,7 @@
def __init__(self, dataStoreDirectory, subServiceFactory,
schema, databaseName='subpostgres', resetSchema=False,
- testMode=False):
+ logFile="postgres.log", testMode=False):
"""
Initialize a L{PostgresService} pointed at a data store directory.
@@ -177,6 +177,7 @@
self.socketDir = CachingFilePath("/tmp/ccs_postgres_%s/" %
(md5(dataStoreDirectory.path).hexdigest()))
self.databaseName = databaseName
+ self.logFile = logFile
self.schema = schema
self.monitor = None
self.openConnections = []
@@ -300,7 +301,7 @@
[
pg_ctl,
"start",
- "-l", "logfile",
+ "-l", self.logFile,
"-w",
# XXX what are the quoting rules for '-o'? do I need to repr()
# the path here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100811/cd9a7d40/attachment-0001.html>
More information about the calendarserver-changes
mailing list