<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[15301] CalendarServer/branches/users/cdaboo/newlog</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/15301">15301</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2015-11-09 16:06:26 -0800 (Mon, 09 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update log messages to use new .format() syntax. Switch over to new Twisted logging module.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarserveraccesslogpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/accesslog.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarserverprovisionrootpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/provision/root.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarserverpushamppushpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/amppush.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarserverpushapplepushpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/applepush.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarserverpushnotifierpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/notifier.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarserverpushutilpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/util.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarservertapcaldavpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/tap/caldav.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarservertaptesttest_caldavpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/tap/test/test_caldav.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarservertoolscmdlinepy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/cmdline.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarservertoolsdkimtoolpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/dkimtool.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarservertoolspurgepy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/purge.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarservertoolsshellcmdpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/cmd.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarservertoolsshellterminalpy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/terminal.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarservertoolsshellvfspy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/vfs.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarservertoolsupgradepy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/upgrade.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogcalendarserverwebcalresourcepy">CalendarServer/branches/users/cdaboo/newlog/calendarserver/webcal/resource.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavaccountingpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/accounting.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavauthkerbpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/authkerb.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavcaldavxmlpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/caldavxml.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavclientgeturlpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/geturl.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavclientpoolpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/pool.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavclientreverseproxypy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/reverseproxy.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavdatabasepy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/database.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectoryaugmentpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/augment.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectorycalendarpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/calendar.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectorycommonpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/common.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectoryprincipalpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/principal.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectoryutilpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/util.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectorybackedaddressbookpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directorybackedaddressbook.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavextensionspy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/extensions.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavfreebusyurlpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/freebusyurl.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavicalpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/ical.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavlocalizationpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/localization.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmemcacheclientpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacheclient.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmemcachelockpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcachelock.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmemcachepoolpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcachepool.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmemcachepropspy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacheprops.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmemcacherpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacher.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodmkcalendarpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/mkcalendar.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodmkcolpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/mkcol.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodpostpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/post.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodpropfindpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/propfind.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodreportpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodreport_addressbook_querypy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_addressbook_query.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodreport_calendar_querypy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_calendar_query.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodreport_freebusypy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_freebusy.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodreport_sync_collectionpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_sync_collection.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavresourcepy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/resource.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavscheduling_storecaldavresourcepy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/scheduling_store/caldav/resource.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavsharingpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/sharing.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavsqlpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/sql.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavstdconfigpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/stdconfig.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavstorebridgepy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/storebridge.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavtesttest_configpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/test/test_config.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavtestutilpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/test/util.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavtimezonespy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/timezones.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavtimezonestdservicepy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/timezonestdservice.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavupgradepy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/upgrade.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavutilpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/util.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtwistedcaldavvcardpy">CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/vcard.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavbasedatastoresubpostgrespy">CalendarServer/branches/users/cdaboo/newlog/txdav/base/datastore/subpostgres.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavbasedatastoreutilpy">CalendarServer/branches/users/cdaboo/newlog/txdav/base/datastore/util.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavbasepropertystoretestbasepy">CalendarServer/branches/users/cdaboo/newlog/txdav/base/propertystore/test/base.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastorefilepy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/file.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreindex_filepy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/index_file.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastorequeryfilterpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/query/filter.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingcaldavdeliverypy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/caldav/delivery.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingfreebusypy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/freebusy.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingicaldiffpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/icaldiff.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingimipinboundpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/imip/inbound.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingimipoutboundpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/imip/outbound.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingimplicitpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/implicit.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingischeduledkimpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/ischedule/dkim.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingitippy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/itip.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingprocessingpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/processing.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingutilspy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/utils.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingworkpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/work.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoresqlpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/sql.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoretesttest_implicitpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/test/test_implicit.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoretesttest_sqlpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/test/test_sql.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreutilpy">CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/util.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcarddavdatastorefilepy">CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/file.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcarddavdatastoreindex_filepy">CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/index_file.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcarddavdatastoresqlpy">CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/sql.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcarddavdatastoretesttest_sqlpy">CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/test/test_sql.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcarddavdatastoreutilpy">CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/util.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcommondatastorefilepy">CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/file.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcommondatastorepoddingmigrationhome_syncpy">CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/podding/migration/home_sync.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoresqlpy">CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/sql.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoretesttest_sqlpy">CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/test/test_sql.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoretestutilpy">CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/test/util.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoreupgrademigratepy">CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/upgrade/migrate.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoreupgradesqlupgradepy">CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/upgrade/sql/upgrade.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoreworkinbox_cleanuppy">CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/work/inbox_cleanup.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoreworkload_workpy">CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/work/load_work.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavdpsserverpy">CalendarServer/branches/users/cdaboo/newlog/txdav/dps/server.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavwhodelegatespy">CalendarServer/branches/users/cdaboo/newlog/txdav/who/delegates.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavwhodirectorypy">CalendarServer/branches/users/cdaboo/newlog/txdav/who/directory.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxdavxmlbasepy">CalendarServer/branches/users/cdaboo/newlog/txdav/xml/base.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxweb2davhttppy">CalendarServer/branches/users/cdaboo/newlog/txweb2/dav/http.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxweb2httppy">CalendarServer/branches/users/cdaboo/newlog/txweb2/http.py</a></li>
<li><a href="#CalendarServerbranchesuserscdaboonewlogtxweb2logpy">CalendarServer/branches/users/cdaboo/newlog/txweb2/log.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarserveraccesslogpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/accesslog.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/accesslog.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/accesslog.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -359,10 +359,10 @@
</span><span class="cx"> 
</span><span class="cx">         newpath = &quot;%s.%s&quot; % (self.logpath, self.suffix(self.lastDate))
</span><span class="cx">         if os.path.exists(newpath):
</span><del>-            log.info(&quot;Cannot rotate log file to %s because it already exists.&quot; % (newpath,))
</del><ins>+            log.info(&quot;Cannot rotate log file to '{path}' because it already exists.&quot;, path=newpath)
</ins><span class="cx">             return
</span><span class="cx">         self.accessLog(&quot;Log closed - rotating: [%s].&quot; % (datetime.datetime.now().ctime(),), False)
</span><del>-        log.info(&quot;Rotating log file to: %s&quot; % (newpath,), system=&quot;Logging&quot;)
</del><ins>+        log.info(&quot;Rotating log file to: '{path}'&quot;, path=newpath, system=&quot;Logging&quot;)
</ins><span class="cx">         self.f.close()
</span><span class="cx">         os.rename(self.logpath, newpath)
</span><span class="cx">         self._open()
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarserverprovisionrootpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/provision/root.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/provision/root.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/provision/root.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -249,9 +249,9 @@
</span><span class="cx">                             )
</span><span class="cx">                         else:
</span><span class="cx">                             log.error(
</span><del>-                                &quot;Failed to look up wiki token {token}: &quot;
-                                &quot;{message}&quot;,
-                                token=token, message=w.message
</del><ins>+                                &quot;Failed to look up wiki token {token}: {msg}&quot;,
+                                token=token,
+                                msg=w.message
</ins><span class="cx">                             )
</span><span class="cx"> 
</span><span class="cx">                     except Exception as e:
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarserverpushamppushpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/amppush.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/amppush.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/amppush.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -267,7 +267,7 @@
</span><span class="cx"> 
</span><span class="cx">     def notify(self, token, id, dataChangedTimestamp, priority):
</span><span class="cx">         if self.subscribedToID(id) == token:
</span><del>-            self.log.debug(&quot;Sending notification for %s to %s&quot; % (id, token))
</del><ins>+            self.log.debug(&quot;Sending notification for {id} to {token}&quot;, id=id, token=token)
</ins><span class="cx">             return self.callRemote(
</span><span class="cx">                 NotificationForID, id=id,
</span><span class="cx">                 dataChangedTimestamp=dataChangedTimestamp,
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarserverpushapplepushpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/applepush.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/applepush.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/applepush.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -133,8 +133,9 @@
</span><span class="cx">                 provider.setServiceParent(service)
</span><span class="cx">                 service.providers[protocol] = provider
</span><span class="cx">                 service.log.info(
</span><del>-                    &quot;APNS %s topic: %s&quot; %
-                    (protocol, settings[protocol][&quot;Topic&quot;]))
</del><ins>+                    &quot;APNS {proto} topic: {topic}&quot;,
+                    proto=protocol, topic=settings[protocol][&quot;Topic&quot;]
+                )
</ins><span class="cx"> 
</span><span class="cx">                 feedback = APNFeedbackService(
</span><span class="cx">                     service.store,
</span><span class="lines">@@ -218,7 +219,7 @@
</span><span class="cx">             protocol = pushKey.split(&quot;/&quot;)[1]
</span><span class="cx">         except ValueError:
</span><span class="cx">             # pushKey has no protocol, so we can't do anything with it
</span><del>-            self.log.error(&quot;Push key '%s' is missing protocol&quot; % (pushKey,))
</del><ins>+            self.log.error(&quot;Push key '{key}' is missing protocol&quot;, key=pushKey)
</ins><span class="cx">             return
</span><span class="cx"> 
</span><span class="cx">         # Unit tests can pass this value in; otherwise it defaults to now
</span><span class="lines">@@ -234,8 +235,9 @@
</span><span class="cx">             numSubscriptions = len(subscriptions)
</span><span class="cx">             if numSubscriptions &gt; 0:
</span><span class="cx">                 self.log.debug(
</span><del>-                    &quot;Sending %d APNS notifications for %s&quot; %
-                    (numSubscriptions, pushKey))
</del><ins>+                    &quot;Sending {num} APNS notifications for {key}&quot;,
+                    num=numSubscriptions, key=pushKey
+                )
</ins><span class="cx">                 tokens = [record.token for record in subscriptions if record.token and record.subscriberGUID]
</span><span class="cx">                 if tokens:
</span><span class="cx">                     provider.scheduleNotifications(
</span><span class="lines">@@ -292,7 +294,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def connectionLost(self, reason=None):
</span><del>-        # self.log.debug(&quot;ProviderProtocol connectionLost: %s&quot; % (reason,))
</del><ins>+        # self.log.debug(&quot;ProviderProtocol connectionLost: {reason}&quot;, reason=reason)
</ins><span class="cx">         # Clear the reference to us from the factory
</span><span class="cx">         self.factory.connection = None
</span><span class="cx"> 
</span><span class="lines">@@ -307,7 +309,7 @@
</span><span class="cx">         if fn is None:
</span><span class="cx">             fn = self.processError
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;ProviderProtocol dataReceived %d bytes&quot; % (len(data),))
</del><ins>+        self.log.debug(&quot;ProviderProtocol dataReceived {len} bytes&quot;, len=len(data))
</ins><span class="cx">         self.buffer += data
</span><span class="cx"> 
</span><span class="cx">         while len(self.buffer) &gt;= self.MESSAGE_LENGTH:
</span><span class="lines">@@ -320,8 +322,9 @@
</span><span class="cx">                     yield fn(status, identifier)
</span><span class="cx">             except Exception, e:
</span><span class="cx">                 self.log.warn(
</span><del>-                    &quot;ProviderProtocol could not process error: %s (%s)&quot; %
-                    (message.encode(&quot;hex&quot;), e))
</del><ins>+                    &quot;ProviderProtocol could not process error: {code} ({ex})&quot;,
+                    code=message.encode(&quot;hex&quot;), ex=e
+                )
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="lines">@@ -339,19 +342,21 @@
</span><span class="cx">         @type status: C{int}
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         msg = self.STATUS_CODES.get(status, &quot;Unknown status code&quot;)
</span><del>-        self.log.info(&quot;Received APN error %d on identifier %d: %s&quot; % (status, identifier, msg))
</del><ins>+        self.log.info(&quot;Received APN error {status} on identifier {id}: {msg}&quot;, status=status, id=identifier, msg=msg)
</ins><span class="cx">         if status in self.TOKEN_REMOVAL_CODES:
</span><span class="cx">             token = self.history.extractIdentifier(identifier)
</span><span class="cx">             if token is not None:
</span><span class="cx">                 self.log.debug(
</span><del>-                    &quot;Removing subscriptions for bad token: %s&quot; %
-                    (token,))
</del><ins>+                    &quot;Removing subscriptions for bad token: {token}&quot;,
+                    token=token,
+                )
</ins><span class="cx">                 txn = self.factory.store.newTransaction(label=&quot;APNProviderProtocol.processError&quot;)
</span><span class="cx">                 subscriptions = (yield txn.apnSubscriptionsByToken(token))
</span><span class="cx">                 for record in subscriptions:
</span><span class="cx">                     self.log.debug(
</span><del>-                        &quot;Removing subscription: %s %s&quot; %
-                        (token, record.resourceKey))
</del><ins>+                        &quot;Removing subscription: {token} {key}&quot;,
+                        token=token, key=record.resourceKey
+                    )
</ins><span class="cx">                     yield txn.removeAPNSubscription(token, record.resourceKey)
</span><span class="cx">                 yield txn.commit()
</span><span class="cx"> 
</span><span class="lines">@@ -376,7 +381,7 @@
</span><span class="cx">         try:
</span><span class="cx">             binaryToken = token.replace(&quot; &quot;, &quot;&quot;).decode(&quot;hex&quot;)
</span><span class="cx">         except:
</span><del>-            self.log.error(&quot;Invalid APN token in database: %s&quot; % (token,))
</del><ins>+            self.log.error(&quot;Invalid APN token in database: {token}&quot;, token=token)
</ins><span class="cx">             return
</span><span class="cx"> 
</span><span class="cx">         identifier = self.history.add(token)
</span><span class="lines">@@ -485,12 +490,12 @@
</span><span class="cx"> 
</span><span class="cx">     def clientConnectionLost(self, connector, reason):
</span><span class="cx">         if not self.shuttingDown:
</span><del>-            self.log.info(&quot;Connection to APN server lost: %s&quot; % (reason,))
</del><ins>+            self.log.info(&quot;Connection to APN server lost: {reason}&quot;, reason=reason)
</ins><span class="cx">         ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def clientConnectionFailed(self, connector, reason):
</span><del>-        self.log.error(&quot;Unable to connect to APN server: %s&quot; % (reason,))
</del><ins>+        self.log.error(&quot;Unable to connect to APN server: {reason}&quot;, reason=reason)
</ins><span class="cx">         self.connected = False
</span><span class="cx">         ReconnectingClientFactory.clientConnectionFailed(
</span><span class="cx">             self, connector,
</span><span class="lines">@@ -653,10 +658,10 @@
</span><span class="cx">             tokenKeyPair = (token, key)
</span><span class="cx">             for existingPair, _ignore_timstamp, priority in self.queue:
</span><span class="cx">                 if tokenKeyPair == existingPair:
</span><del>-                    self.log.debug(&quot;APNProviderService has no connection; skipping duplicate: %s %s&quot; % (token, key))
</del><ins>+                    self.log.debug(&quot;APNProviderService has no connection; skipping duplicate: {token} {key}&quot;, token=token, key=key)
</ins><span class="cx">                     break # Already scheduled
</span><span class="cx">             else:
</span><del>-                self.log.debug(&quot;APNProviderService has no connection; queuing: %s %s&quot; % (token, key))
</del><ins>+                self.log.debug(&quot;APNProviderService has no connection; queuing: {token} {key}&quot;, token=token, key=key)
</ins><span class="cx">                 self.queue.append(((token, key), dataChangedTimestamp, priority))
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -708,7 +713,7 @@
</span><span class="cx">         if fn is None:
</span><span class="cx">             fn = self.processFeedback
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;FeedbackProtocol dataReceived %d bytes&quot; % (len(data),))
</del><ins>+        self.log.debug(&quot;FeedbackProtocol dataReceived {len} bytes&quot;, len=len(data))
</ins><span class="cx">         self.buffer += data
</span><span class="cx"> 
</span><span class="cx">         while len(self.buffer) &gt;= self.MESSAGE_LENGTH:
</span><span class="lines">@@ -723,8 +728,9 @@
</span><span class="cx">                 yield fn(timestamp, token)
</span><span class="cx">             except Exception, e:
</span><span class="cx">                 self.log.warn(
</span><del>-                    &quot;FeedbackProtocol could not process message: %s (%s)&quot; %
-                    (message.encode(&quot;hex&quot;), e))
</del><ins>+                    &quot;FeedbackProtocol could not process message: {code} ({ex})&quot;,
+                    code=message.encode(&quot;hex&quot;), ex=e
+                )
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="lines">@@ -743,16 +749,18 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><span class="cx">         self.log.debug(
</span><del>-            &quot;FeedbackProtocol processFeedback time=%d token=%s&quot; %
-            (timestamp, token))
</del><ins>+            &quot;FeedbackProtocol processFeedback time={time} token={token}&quot;,
+            time=timestamp, token=token
+        )
</ins><span class="cx">         txn = self.factory.store.newTransaction(label=&quot;APNFeedbackProtocol.processFeedback&quot;)
</span><span class="cx">         subscriptions = (yield txn.apnSubscriptionsByToken(token))
</span><span class="cx"> 
</span><span class="cx">         for record in subscriptions:
</span><span class="cx">             if timestamp &gt; record.modified:
</span><span class="cx">                 self.log.debug(
</span><del>-                    &quot;FeedbackProtocol removing subscription: %s %s&quot; %
-                    (token, record.resourceKey))
</del><ins>+                    &quot;FeedbackProtocol removing subscription: {token} {key}&quot;,
+                    token=token, key=record.resourceKey,
+                )
</ins><span class="cx">                 yield txn.removeAPNSubscription(token, record.resourceKey)
</span><span class="cx">         yield txn.commit()
</span><span class="cx"> 
</span><span class="lines">@@ -769,8 +777,9 @@
</span><span class="cx"> 
</span><span class="cx">     def clientConnectionFailed(self, connector, reason):
</span><span class="cx">         self.log.error(
</span><del>-            &quot;Unable to connect to APN feedback server: %s&quot; %
-            (reason,))
</del><ins>+            &quot;Unable to connect to APN feedback server: {reason}&quot;,
+            reason=reason,
+        )
</ins><span class="cx">         self.connected = False
</span><span class="cx">         ClientFactory.clientConnectionFailed(self, connector, reason)
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarserverpushnotifierpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/notifier.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/notifier.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/notifier.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -107,12 +107,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def enableNotify(self, arg):
</span><del>-        self.log.debug(&quot;enableNotify: %s&quot; % (self._ids['default'][1],))
</del><ins>+        self.log.debug(&quot;enableNotify: {id}&quot;, id=self._ids['default'][1])
</ins><span class="cx">         self._notify = True
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def disableNotify(self):
</span><del>-        self.log.debug(&quot;disableNotify: %s&quot; % (self._ids['default'][1],))
</del><ins>+        self.log.debug(&quot;disableNotify: {id}&quot;, id=self._ids['default'][1])
</ins><span class="cx">         self._notify = False
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -138,15 +138,17 @@
</span><span class="cx">         for prefix, id in ids:
</span><span class="cx">             if self._notify:
</span><span class="cx">                 self.log.debug(
</span><del>-                    &quot;Notifications are enabled: %s %s/%s priority=%d&quot; %
-                    (self._storeObject, prefix, id, priority.value))
</del><ins>+                    &quot;Notifications are enabled: {obj} {prefix}/{id} priority={priority}&quot;,
+                    obj=self._storeObject, prefix=prefix, id=id, priority=priority.value
+                )
</ins><span class="cx">                 yield self._notifierFactory.send(
</span><span class="cx">                     prefix, id, txn,
</span><span class="cx">                     priority=priority)
</span><span class="cx">             else:
</span><span class="cx">                 self.log.debug(
</span><del>-                    &quot;Skipping notification for: %s %s/%s&quot; %
-                    (self._storeObject, prefix, id,))
</del><ins>+                    &quot;Skipping notification for: %{obj} {prefix}/{id}&quot;,
+                    obj=self._storeObject, prefix=prefix, id=id,
+                )
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def clone(self, storeObject):
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarserverpushutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/util.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/util.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/push/util.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -189,15 +189,17 @@
</span><span class="cx">             internalKey = (token, key)
</span><span class="cx">             if internalKey in self.outstanding:
</span><span class="cx">                 self.log.debug(
</span><del>-                    &quot;PushScheduler already has this scheduled: %s&quot; %
-                    (internalKey,))
</del><ins>+                    &quot;PushScheduler already has this scheduled: {key}&quot;,
+                    key=internalKey,
+                )
</ins><span class="cx">             else:
</span><span class="cx">                 self.outstanding[internalKey] = self.reactor.callLater(
</span><span class="cx">                     scheduleTime, self.send, token, key, dataChangedTimestamp,
</span><span class="cx">                     priority)
</span><span class="cx">                 self.log.debug(
</span><del>-                    &quot;PushScheduler scheduled: %s in %.0f sec&quot; %
-                    (internalKey, scheduleTime))
</del><ins>+                    &quot;PushScheduler scheduled: {key} in {time:.0f} sec&quot;,
+                    key=internalKey, time=scheduleTime
+                )
</ins><span class="cx">                 scheduleTime += self.staggerSeconds
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -215,7 +217,7 @@
</span><span class="cx">             which triggered this notification
</span><span class="cx">         @type key: C{int}
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        self.log.debug(&quot;PushScheduler fired for %s %s %d&quot; % (token, key, dataChangedTimestamp))
</del><ins>+        self.log.debug(&quot;PushScheduler fired for {token} {key} {time}&quot;, token=token, key=key, time=dataChangedTimestamp)
</ins><span class="cx">         del self.outstanding[(token, key)]
</span><span class="cx">         return self.callback(token, key, dataChangedTimestamp, priority)
</span><span class="cx"> 
</span><span class="lines">@@ -225,5 +227,5 @@
</span><span class="cx">         Cancel all outstanding delayed calls
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         for (token, key), delayed in self.outstanding.iteritems():
</span><del>-            self.log.debug(&quot;PushScheduler cancelling %s %s&quot; % (token, key))
</del><ins>+            self.log.debug(&quot;PushScheduler cancelling {token} {key}&quot;, token=token, key=key)
</ins><span class="cx">             delayed.cancel()
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarservertapcaldavpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/tap/caldav.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/tap/caldav.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/tap/caldav.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> 
</span><span class="cx"> from twistedcaldav.stdconfig import config
</span><span class="cx"> 
</span><del>-from twisted.python.log import FileLogObserver, ILogObserver
</del><ins>+from twisted.python.log import ILogObserver
</ins><span class="cx"> from twisted.python.logfile import LogFile
</span><span class="cx"> from twisted.python.usage import Options, UsageError
</span><span class="cx"> from twisted.python.util import uidFromString, gidFromString
</span><span class="lines">@@ -56,9 +56,10 @@
</span><span class="cx"> from twisted.application.service import MultiService, IServiceMaker
</span><span class="cx"> from twisted.application.service import Service
</span><span class="cx"> from twisted.protocols.amp import AMP
</span><ins>+from twisted.logger import LogLevel
</ins><span class="cx"> 
</span><span class="cx"> from twext.python.filepath import CachingFilePath
</span><del>-from twext.python.log import Logger, LogLevel, replaceTwistedLoggers
</del><ins>+from twext.python.log import Logger
</ins><span class="cx"> from twext.internet.fswatch import (
</span><span class="cx">     DirectoryChangeListener, IDirectoryChangeListenee
</span><span class="cx"> )
</span><span class="lines">@@ -254,13 +255,16 @@
</span><span class="cx">                 rotateLength=self.logRotateLength,
</span><span class="cx">                 maxRotatedFiles=self.logMaxFiles
</span><span class="cx">             )
</span><del>-            errorLogObserver = FileLogObserver(errorLogFile).emit
</del><span class="cx">             if self.logRotateOnStart:
</span><span class="cx">                 errorLogFile.rotate()
</span><ins>+        else:
+            errorLogFile = sys.stdout
+        withTime = not (not config.ErrorLogFile and config.ProcessType in (&quot;Slave&quot;, &quot;DPS&quot;,))
+        errorLogObserver = Logger.makeFilteredFileLogObserver(errorLogFile, withTime=withTime)
</ins><span class="cx"> 
</span><del>-            # Registering ILogObserver with the Application object
-            # gets our observer picked up within AppLogger.start( )
-            app.setComponent(ILogObserver, errorLogObserver)
</del><ins>+        # Registering ILogObserver with the Application object
+        # gets our observer picked up within AppLogger.start( )
+        app.setComponent(ILogObserver, errorLogObserver)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -452,13 +456,6 @@
</span><span class="cx"> 
</span><span class="cx">         self.checkDirectories(config)
</span><span class="cx"> 
</span><del>-        #
-        # Nuke the file log observer's time format.
-        #
-
-        if not config.ErrorLogFile and config.ProcessType == &quot;Slave&quot;:
-            FileLogObserver.timeFormat = &quot;&quot;
-
</del><span class="cx">         # Check current umask and warn if changed
</span><span class="cx">         oldmask = umask(config.umask)
</span><span class="cx">         if oldmask != config.umask:
</span><span class="lines">@@ -534,6 +531,9 @@
</span><span class="cx">             &quot;--reactor={}&quot;.format(config.Twisted.reactor),
</span><span class="cx">             &quot;-n&quot;, &quot;caldav_directoryproxy&quot;,
</span><span class="cx">             &quot;-f&quot;, self.configPath,
</span><ins>+            &quot;-o&quot;, &quot;ProcessType=DPS&quot;,
+            &quot;-o&quot;, &quot;ErrorLogFile=None&quot;,
+            &quot;-o&quot;, &quot;ErrorLogEnabled=False&quot;,
</ins><span class="cx">         ))
</span><span class="cx">         self.monitor.addProcess(
</span><span class="cx">             &quot;directoryproxy&quot;, dpsArgv, env=PARENT_ENVIRONMENT
</span><span class="lines">@@ -746,7 +746,6 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Create the top-level service.
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        replaceTwistedLoggers()
</del><span class="cx"> 
</span><span class="cx">         self.log.info(
</span><span class="cx">             &quot;{log_source.description} {version} starting &quot;
</span><span class="lines">@@ -988,8 +987,8 @@
</span><span class="cx">         # Change default log level to &quot;info&quot; as its useful to have
</span><span class="cx">         # that during startup
</span><span class="cx">         #
</span><del>-        oldLogLevel = log.publisher.levels.logLevelForNamespace(None)
-        log.publisher.levels.setLogLevelForNamespace(None, LogLevel.info)
</del><ins>+        oldLogLevel = log.levels().logLevelForNamespace(None)
+        log.levels().setLogLevelForNamespace(None, LogLevel.info)
</ins><span class="cx"> 
</span><span class="cx">         # Note: 'additional' was used for IMIP reply resource, and perhaps
</span><span class="cx">         # we can remove this
</span><span class="lines">@@ -1175,7 +1174,7 @@
</span><span class="cx">                     ).setServiceParent(connectionService)
</span><span class="cx"> 
</span><span class="cx">         # Change log level back to what it was before
</span><del>-        log.publisher.levels.setLogLevelForNamespace(None, oldLogLevel)
</del><ins>+        log.levels().setLogLevelForNamespace(None, oldLogLevel)
</ins><span class="cx">         return service
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -2559,8 +2558,9 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def lineReceived(self, line):
</span><del>-        from twisted.python.log import msg
-        msg(&quot;[{}] {}&quot;.format(self.tag, line))
</del><ins>+        # Hand off slave log entry to logging system as critical to ensure it is always
+        # displayed (as the slave will have filtered out unwanted entries itself).
+        log.critical(&quot;{msg}&quot;, msg=line, log_system=self.tag, isError=False)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def lineLengthExceeded(self, line):
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarservertaptesttest_caldavpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/tap/test/test_caldav.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/tap/test/test_caldav.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/tap/test/test_caldav.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx">         finally:
</span><span class="cx">             sys.stdout = oldout
</span><span class="cx">             log.info(
</span><del>-                &quot;load configuration console output: %s&quot; % newout.getvalue()
</del><ins>+                &quot;load configuration console output: {result}&quot;, result=newout.getvalue()
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -1087,10 +1087,9 @@
</span><span class="cx">                 return
</span><span class="cx">             if event.get('isError'):
</span><span class="cx">                 d.errback()
</span><del>-            m = event.get('message')[0]
-            if m.startswith('[Dummy] '):
-                logged.append(event)
-                if m == '[Dummy] z':
</del><ins>+            if event.get(&quot;log_system&quot;) == u'Dummy':
+                logged.append(event[&quot;msg&quot;])
+                if event[&quot;msg&quot;] == u'z':
</ins><span class="cx">                     d.callback(&quot;done&quot;)
</span><span class="cx"> 
</span><span class="cx">         logging.addObserver(tempObserver)
</span><span class="lines">@@ -1098,18 +1097,16 @@
</span><span class="cx">         d = Deferred()
</span><span class="cx"> 
</span><span class="cx">         def assertions(result):
</span><del>-            self.assertEquals([&quot;[Dummy] x&quot;,
-                               &quot;[Dummy] y&quot;,
-                               &quot;[Dummy] y&quot;,  # final segment
-                               &quot;[Dummy] z&quot;],
-                              [''.join(evt['message'])[:len('[Dummy]') + 2]
-                               for evt in logged])
</del><ins>+            self.assertEquals([&quot;x&quot;,
+                               &quot;y&quot;,
+                               &quot;y&quot;,  # final segment
+                               &quot;z&quot;],
+                              [msg[0] for msg in logged])
</ins><span class="cx">             self.assertEquals([&quot; (truncated, continued)&quot;,
</span><span class="cx">                                &quot; (truncated, continued)&quot;,
</span><del>-                               &quot;[Dummy] y&quot;,
-                               &quot;[Dummy] z&quot;],
-                              [''.join(evt['message'])[-len(&quot; (truncated, continued)&quot;):]
-                               for evt in logged])
</del><ins>+                               &quot;y&quot;,
+                               &quot;z&quot;],
+                              [msg[-len(&quot; (truncated, continued)&quot;):] for msg in logged])
</ins><span class="cx">         d.addCallback(assertions)
</span><span class="cx">         return d
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarservertoolscmdlinepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/cmdline.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/cmdline.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/cmdline.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -18,22 +18,23 @@
</span><span class="cx"> Shared main-point between utilities.
</span><span class="cx"> &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-from calendarserver.tap.util import checkDirectories
</del><ins>+from calendarserver.tap.util import checkDirectories, getRootResource
</ins><span class="cx"> from calendarserver.tools.util import loadConfig, autoDisableMemcached
</span><span class="cx"> 
</span><del>-from twext.python.log import StandardIOObserver
</del><ins>+from twext.enterprise.jobs.queue import NonPerformingQueuer
+from twext.python.log import Logger
</ins><span class="cx"> 
</span><span class="cx"> from twistedcaldav.config import ConfigurationError
</span><ins>+from twistedcaldav.timezones import TimezoneCache
+
+from twisted.application.service import Service
</ins><span class="cx"> from twisted.internet.defer import inlineCallbacks, succeed
</span><del>-from twisted.application.service import Service
</del><ins>+from twisted.logger import STDLibLogObserver
</ins><span class="cx"> from twisted.python.logfile import LogFile
</span><del>-from twisted.python.log import FileLogObserver
</del><ins>+from twisted.python.log import addObserver
</ins><span class="cx"> 
</span><span class="cx"> import sys
</span><del>-from calendarserver.tap.util import getRootResource
</del><span class="cx"> from errno import ENOENT, EACCES
</span><del>-from twext.enterprise.jobs.queue import NonPerformingQueuer
-from twistedcaldav.timezones import TimezoneCache
</del><span class="cx"> 
</span><span class="cx"> # TODO: direct unit tests for these functions.
</span><span class="cx"> 
</span><span class="lines">@@ -87,7 +88,7 @@
</span><span class="cx"> 
</span><span class="cx">     # Install std i/o observer
</span><span class="cx">     if verbose:
</span><del>-        observer = StandardIOObserver()
</del><ins>+        observer = STDLibLogObserver()
</ins><span class="cx">         observer.start()
</span><span class="cx"> 
</span><span class="cx">     if reactor is None:
</span><span class="lines">@@ -104,8 +105,8 @@
</span><span class="cx">             rotateLength=config.ErrorLogRotateMB * 1024 * 1024,
</span><span class="cx">             maxRotatedFiles=config.ErrorLogMaxRotatedFiles
</span><span class="cx">         )
</span><del>-        utilityLogObserver = FileLogObserver(utilityLogFile)
-        utilityLogObserver.start()
</del><ins>+        utilityLogObserver = Logger.makeFilteredFileLogObserver(utilityLogFile)
+        addObserver(utilityLogObserver)
</ins><span class="cx"> 
</span><span class="cx">         config.ProcessType = &quot;Utility&quot;
</span><span class="cx">         config.UtilityServiceClass = _makeValidService
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarservertoolsdkimtoolpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/dkimtool.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/dkimtool.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/dkimtool.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -22,9 +22,10 @@
</span><span class="cx"> 
</span><span class="cx"> from twisted.internet import reactor
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks
</span><ins>+from twisted.logger import LogLevel, STDLibLogObserver
</ins><span class="cx"> from twisted.python.usage import Options
</span><span class="cx"> 
</span><del>-from twext.python.log import Logger, LogLevel, StandardIOObserver
</del><ins>+from twext.python.log import Logger
</ins><span class="cx"> from txweb2.http_headers import Headers
</span><span class="cx"> 
</span><span class="cx"> from txdav.caldav.datastore.scheduling.ischedule.dkim import RSA256, DKIMRequest, \
</span><span class="lines">@@ -69,7 +70,7 @@
</span><span class="cx"> def _doRequest(options):
</span><span class="cx"> 
</span><span class="cx">     if options[&quot;verbose&quot;]:
</span><del>-        log.publisher.levels.setLogLevelForNamespace(&quot;txdav.caldav.datastore.scheduling.ischedule.dkim&quot;, LogLevel.debug)
</del><ins>+        log.levels().setLogLevelForNamespace(&quot;txdav.caldav.datastore.scheduling.ischedule.dkim&quot;, LogLevel.debug)
</ins><span class="cx"> 
</span><span class="cx">     # Parse the HTTP file
</span><span class="cx">     with open(options[&quot;request&quot;]) as f:
</span><span class="lines">@@ -300,11 +301,11 @@
</span><span class="cx">     #
</span><span class="cx">     # Send logging output to stdout
</span><span class="cx">     #
</span><del>-    observer = StandardIOObserver()
</del><ins>+    observer = STDLibLogObserver()
</ins><span class="cx">     observer.start()
</span><span class="cx"> 
</span><span class="cx">     if options[&quot;verbose&quot;]:
</span><del>-        log.publisher.levels.setLogLevelForNamespace(&quot;txdav.caldav.datastore.scheduling.ischedule.dkim&quot;, LogLevel.debug)
</del><ins>+        log.levels().setLogLevelForNamespace(&quot;txdav.caldav.datastore.scheduling.ischedule.dkim&quot;, LogLevel.debug)
</ins><span class="cx"> 
</span><span class="cx">     if options[&quot;key-gen&quot;]:
</span><span class="cx">         _doKeyGeneration(options)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarservertoolspurgepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/purge.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/purge.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/purge.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -420,7 +420,7 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Find all the calendar homes that match the uuid cli argument.
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        log.debug(&quot;Searching for calendar homes matching: '{}'&quot;.format(self.uuid))
</del><ins>+        log.debug(&quot;Searching for calendar homes matching: '{uid}'&quot;, uid=self.uuid)
</ins><span class="cx">         txn = self.store.newTransaction(label=&quot;Find matching homes&quot;)
</span><span class="cx">         ch = schema.CALENDAR_HOME
</span><span class="cx">         if self.uuid:
</span><span class="lines">@@ -437,7 +437,7 @@
</span><span class="cx">             ).on(txn))
</span><span class="cx"> 
</span><span class="cx">         yield txn.commit()
</span><del>-        log.debug(&quot;  Found {} calendar homes&quot;.format(len(rows)))
</del><ins>+        log.debug(&quot;  Found {len} calendar homes&quot;, len=len(rows))
</ins><span class="cx">         returnValue(sorted(rows, key=lambda x: x[1]))
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -451,7 +451,7 @@
</span><span class="cx">         @param owner_uid: owner UUID of home to check
</span><span class="cx">         @type owner_uid: L{str}
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        log.debug(&quot;Checking calendar home: {} '{}'&quot;.format(home_id, owner_uid))
</del><ins>+        log.debug(&quot;Checking calendar home: {id} '{uid}'&quot;, id=home_id, uid=owner_uid)
</ins><span class="cx">         txn = self.store.newTransaction(label=&quot;Find matching calendars&quot;)
</span><span class="cx">         cb = schema.CALENDAR_BIND
</span><span class="cx">         kwds = {&quot;home_id&quot;: home_id}
</span><span class="lines">@@ -463,7 +463,7 @@
</span><span class="cx">             ),
</span><span class="cx">         ).on(txn, **kwds))
</span><span class="cx">         yield txn.commit()
</span><del>-        log.debug(&quot;  Found {} calendars&quot;.format(len(rows)))
</del><ins>+        log.debug(&quot;  Found {len} calendars&quot;, len=len(rows))
</ins><span class="cx">         returnValue(rows)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -483,7 +483,7 @@
</span><span class="cx">         @type calendar_name: L{str}
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-        log.debug(&quot;  Checking calendar: {} '{}'&quot;.format(calendar_id, calendar_name))
</del><ins>+        log.debug(&quot;  Checking calendar: {id} '{name}'&quot;, id=calendar_id, name=calendar_name)
</ins><span class="cx">         purge = set()
</span><span class="cx">         txn = self.store.newTransaction(label=&quot;Find matching resources&quot;)
</span><span class="cx">         co = schema.CALENDAR_OBJECT
</span><span class="lines">@@ -503,7 +503,7 @@
</span><span class="cx">             ),
</span><span class="cx">         ).on(txn, **kwds))
</span><span class="cx"> 
</span><del>-        log.debug(&quot;    Found {} resources to check&quot;.format(len(rows)))
</del><ins>+        log.debug(&quot;    Found {len} resources to check&quot;, len=len(rows))
</ins><span class="cx">         for resource_id, recurrence_max, recurrence_min, max_end_date in rows:
</span><span class="cx"> 
</span><span class="cx">             recurrence_max = parseSQLDateToPyCalendar(recurrence_max) if recurrence_max else None
</span><span class="lines">@@ -530,7 +530,7 @@
</span><span class="cx">                     purge.add(self.PurgeEvent(home_id, calendar_id, resource_id,))
</span><span class="cx"> 
</span><span class="cx">         yield txn.commit()
</span><del>-        log.debug(&quot;    Found {} resources to purge&quot;.format(len(purge)))
</del><ins>+        log.debug(&quot;    Found {len} resources to purge&quot;, len=len(purge))
</ins><span class="cx">         returnValue(purge)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -639,13 +639,14 @@
</span><span class="cx">                 last_calendar = event.calendar
</span><span class="cx">             resource = (yield calendar.objectResourceWithID(event.resource))
</span><span class="cx">             yield resource.purge(implicitly=False)
</span><del>-            log.debug(&quot;Removed resource {} '{}' from calendar {} '{}' of calendar home '{}'&quot;.format(
-                resource.id(),
-                resource.name(),
-                resource.parentCollection().id(),
-                resource.parentCollection().name(),
-                resource.parentCollection().ownerHome().uid()
-            ))
</del><ins>+            log.debug(
+                &quot;Removed resource {id} '{name}' from calendar {pid} '{pname}' of calendar home '{uid}'&quot;,
+                id=resource.id(),
+                name=resource.name(),
+                pid=resource.parentCollection().id(),
+                pname=resource.parentCollection().name(),
+                uid=resource.parentCollection().ownerHome().uid()
+            )
</ins><span class="cx">             count += 1
</span><span class="cx">         yield txn.commit()
</span><span class="cx">         returnValue(count)
</span><span class="lines">@@ -679,18 +680,18 @@
</span><span class="cx">         if self.dryrun:
</span><span class="cx">             eventCount = len(purge)
</span><span class="cx">             if eventCount == 0:
</span><del>-                log.info(&quot;No events are older than %s&quot; % (self.cutoff,))
</del><ins>+                log.info(&quot;No events are older than {cutoff}&quot;, cutoff=self.cutoff)
</ins><span class="cx">             elif eventCount == 1:
</span><del>-                log.info(&quot;1 event is older than %s&quot; % (self.cutoff,))
</del><ins>+                log.info(&quot;1 event is older than {cutoff}&quot;, cutoff=self.cutoff)
</ins><span class="cx">             else:
</span><del>-                log.info(&quot;%d events are older than %s&quot; % (eventCount, self.cutoff))
</del><ins>+                log.info(&quot;{count} events are older than {cutoff}&quot;, count=eventCount, cutoff=self.cutoff)
</ins><span class="cx">             returnValue(eventCount)
</span><span class="cx"> 
</span><span class="cx">         purge = list(purge)
</span><span class="cx">         purge.sort()
</span><span class="cx">         totalEvents = len(purge)
</span><span class="cx"> 
</span><del>-        log.info(&quot;Removing {} events older than {}...&quot;.format(len(purge), self.cutoff,))
</del><ins>+        log.info(&quot;Removing {len} events older than {cutoff}...&quot;, len=len(purge), cutoff=self.cutoff)
</ins><span class="cx"> 
</span><span class="cx">         numEventsRemoved = -1
</span><span class="cx">         totalRemoved = 0
</span><span class="lines">@@ -698,7 +699,7 @@
</span><span class="cx">             numEventsRemoved = (yield self.purgeResources(purge[:self.batchSize]))
</span><span class="cx">             if numEventsRemoved:
</span><span class="cx">                 totalRemoved += numEventsRemoved
</span><del>-                log.debug(&quot;  Removed {} of {} events...&quot;.format(totalRemoved, totalEvents))
</del><ins>+                log.debug(&quot;  Removed {removed} of {total} events...&quot;, removed=totalRemoved, total=totalEvents)
</ins><span class="cx">                 purge = purge[numEventsRemoved:]
</span><span class="cx"> 
</span><span class="cx">         if totalRemoved == 0:
</span><span class="lines">@@ -706,7 +707,7 @@
</span><span class="cx">         elif totalRemoved == 1:
</span><span class="cx">             log.info(&quot;1 event was removed in total&quot;)
</span><span class="cx">         else:
</span><del>-            log.info(&quot;%d events were removed in total&quot; % (totalRemoved,))
</del><ins>+            log.info(&quot;{total} events were removed in total&quot;, total=totalRemoved)
</ins><span class="cx"> 
</span><span class="cx">         returnValue(totalRemoved)
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarservertoolsshellcmdpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/cmd.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/cmd.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/cmd.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -472,7 +472,7 @@
</span><span class="cx">         if not isinstance(wd, Folder):
</span><span class="cx">             raise NotFoundError(&quot;Not a folder: %s&quot; % (wd,))
</span><span class="cx"> 
</span><del>-        # log.info(&quot;wd -&gt; %s&quot; % (wd,))
</del><ins>+        # log.info(&quot;wd -&gt; {wd}&quot;, wd=wd)
</ins><span class="cx">         self.wd = wd
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarservertoolsshellterminalpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/terminal.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/terminal.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/terminal.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -310,7 +310,7 @@
</span><span class="cx">             except Exception, e:
</span><span class="cx">                 self.handleFailure(Failure(e))
</span><span class="cx">                 return
</span><del>-            log.info(&quot;COMPLETIONS: %r&quot; % (completions,))
</del><ins>+            log.info(&quot;COMPLETIONS: {comp}&quot;, comp=completions)
</ins><span class="cx">         else:
</span><span class="cx">             # Completing command name
</span><span class="cx">             completions = tuple(self.commands.complete_commands(cmd))
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarservertoolsshellvfspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/vfs.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/vfs.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/shell/vfs.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -691,7 +691,7 @@
</span><span class="cx">                 self.mainComponent = mainComponent
</span><span class="cx"> 
</span><span class="cx">             except InvalidICalendarDataError, e:
</span><del>-                log.error(&quot;%s: %s&quot; % (self.path, e))
</del><ins>+                log.error(&quot;{path}: {ex}&quot;, path=self.path, ex=e)
</ins><span class="cx"> 
</span><span class="cx">                 self.componentType = &quot;?&quot;
</span><span class="cx">                 self.summary = &quot;** Invalid data **&quot;
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarservertoolsupgradepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/upgrade.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/upgrade.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/tools/upgrade.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -26,10 +26,11 @@
</span><span class="cx"> import time
</span><span class="cx"> 
</span><span class="cx"> from twisted.internet.defer import succeed
</span><ins>+from twisted.logger import LogLevel, formatEvent
</ins><span class="cx"> from twisted.python.text import wordWrap
</span><span class="cx"> from twisted.python.usage import Options, UsageError
</span><span class="cx"> 
</span><del>-from twext.python.log import Logger, LogLevel, formatEvent, addObserver
</del><ins>+from twext.python.log import Logger
</ins><span class="cx"> 
</span><span class="cx"> from twistedcaldav.stdconfig import DEFAULT_CONFIG_FILE
</span><span class="cx"> 
</span><span class="lines">@@ -220,8 +221,8 @@
</span><span class="cx">         output.flush()
</span><span class="cx"> 
</span><span class="cx">     if not options[&quot;status&quot;]:
</span><del>-        log.publisher.levels.setLogLevelForNamespace(None, LogLevel.debug)
-        addObserver(onlyUpgradeEvents)
</del><ins>+        log.levels().setLogLevelForNamespace(None, LogLevel.debug)
+        log.observer.addObserver(onlyUpgradeEvents)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def customServiceMaker():
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogcalendarserverwebcalresourcepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/calendarserver/webcal/resource.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/calendarserver/webcal/resource.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/calendarserver/webcal/resource.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx">         tzid = queryValue(&quot;tzid&quot;)
</span><span class="cx">         if not tzid:
</span><span class="cx">             tzid = getLocalTimezone()
</span><del>-            self.log.debug(&quot;Determined timezone to be %s&quot; % (tzid,))
</del><ins>+            self.log.debug(&quot;Determined timezone to be {tzid}&quot;, tzid=tzid)
</ins><span class="cx"> 
</span><span class="cx">         #
</span><span class="cx">         # Make some HTML
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavaccountingpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/accounting.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/accounting.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/accounting.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx">                         logFilename = path
</span><span class="cx">                         break
</span><span class="cx">                     if index == 1000:
</span><del>-                        log.error(&quot;Too many %s accounting files for %s&quot; % (category, record))
</del><ins>+                        log.error(&quot;Too many {cat} accounting files for {rec}&quot;, cat=category, rec=record)
</ins><span class="cx">                         return None
</span><span class="cx">                     index += 1
</span><span class="cx"> 
</span><span class="lines">@@ -141,5 +141,5 @@
</span><span class="cx"> 
</span><span class="cx">     except OSError, e:
</span><span class="cx">         # No failures in accounting should propagate out
</span><del>-        log.error(&quot;Failed to write accounting data due to: %s&quot; % (str(e),))
</del><ins>+        log.error(&quot;Failed to write accounting data due to: {ex}&quot;, ex=str(e))
</ins><span class="cx">         return None
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavauthkerbpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/authkerb.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/authkerb.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/authkerb.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 principal = kerberos.getServerPrincipalDetails(serviceType, hostname)
</span><span class="cx">             except kerberos.KrbError, ex:
</span><del>-                self.log.error(&quot;getServerPrincipalDetails: %s&quot; % (ex[0],))
</del><ins>+                self.log.error(&quot;getServerPrincipalDetails: {ex}&quot;, ex=ex[0])
</ins><span class="cx">                 raise ValueError('Authentication System Failure: %s' % (ex[0],))
</span><span class="cx"> 
</span><span class="cx">         self.service, self.realm = self._splitPrincipal(principal)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">             service = splits[0].upper()
</span><span class="cx">             realm = splits[1]
</span><span class="cx">         except IndexError:
</span><del>-            self.log.error(&quot;Invalid Kerberos principal: %s&quot; % (principal,))
</del><ins>+            self.log.error(&quot;Invalid Kerberos principal: {principal}&quot;, principal=principal)
</ins><span class="cx">             raise ValueError('Authentication System Failure: Invalid Kerberos principal: %s' % (principal,))
</span><span class="cx"> 
</span><span class="cx">         service = &quot;%s@%s&quot; % (servicetype, service,)
</span><span class="lines">@@ -188,7 +188,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 kerberos.checkPassword(creds.username, creds.password, creds.service, creds.default_realm)
</span><span class="cx">             except kerberos.BasicAuthError, ex:
</span><del>-                self.log.error(&quot;%s&quot; % (ex[0],))
</del><ins>+                self.log.error(&quot;{ex}&quot;, ex=ex[0])
</ins><span class="cx">                 raise error.UnauthorizedLogin(&quot;Bad credentials for: %s (%s: %s)&quot; % (pcreds.authnURI, ex[0], ex[1],))
</span><span class="cx">             else:
</span><span class="cx">                 return succeed((
</span><span class="lines">@@ -247,18 +247,18 @@
</span><span class="cx">         try:
</span><span class="cx">             _ignore_result, context = kerberos.authGSSServerInit(&quot;&quot;)
</span><span class="cx">         except kerberos.GSSError, ex:
</span><del>-            self.log.error(&quot;authGSSServerInit: %s(%s)&quot; % (ex[0][0], ex[1][0],))
</del><ins>+            self.log.error(&quot;authGSSServerInit: {ex0}({ex1})&quot;, ex0=ex[0][0], ex1=ex[1][0])
</ins><span class="cx">             raise error.LoginFailed('Authentication System Failure: %s(%s)' % (ex[0][0], ex[1][0],))
</span><span class="cx"> 
</span><span class="cx">         # Do the GSSAPI step and get response and username
</span><span class="cx">         try:
</span><span class="cx">             kerberos.authGSSServerStep(context, base64data)
</span><span class="cx">         except kerberos.GSSError, ex:
</span><del>-            self.log.error(&quot;authGSSServerStep: %s(%s)&quot; % (ex[0][0], ex[1][0],))
</del><ins>+            self.log.error(&quot;authGSSServerStep: {ex0}(ex1)&quot;, ex0=ex[0][0], ex1=ex[1][0])
</ins><span class="cx">             kerberos.authGSSServerClean(context)
</span><span class="cx">             raise error.UnauthorizedLogin('Bad credentials: %s(%s)' % (ex[0][0], ex[1][0],))
</span><span class="cx">         except kerberos.KrbError, ex:
</span><del>-            self.log.error(&quot;authGSSServerStep: %s&quot; % (ex[0],))
</del><ins>+            self.log.error(&quot;authGSSServerStep: {ex}&quot;, ex=ex[0])
</ins><span class="cx">             kerberos.authGSSServerClean(context)
</span><span class="cx">             raise error.UnauthorizedLogin('Bad credentials: %s' % (ex[0],))
</span><span class="cx"> 
</span><span class="lines">@@ -266,11 +266,11 @@
</span><span class="cx">         try:
</span><span class="cx">             service, _ignore_realm = self._splitPrincipal(targetname)
</span><span class="cx">         except ValueError:
</span><del>-            self.log.error(&quot;authGSSServerTargetName invalid target name: '%s'&quot; % (targetname,))
</del><ins>+            self.log.error(&quot;authGSSServerTargetName invalid target name: '{target}'&quot;, target=targetname)
</ins><span class="cx">             kerberos.authGSSServerClean(context)
</span><span class="cx">             raise error.UnauthorizedLogin('Bad credentials: bad target name %s' % (targetname,))
</span><span class="cx">         if service.lower() != self.service.lower():
</span><del>-            self.log.error(&quot;authGSSServerTargetName mismatch got: '%s' wanted: '%s'&quot; % (service, self.service))
</del><ins>+            self.log.error(&quot;authGSSServerTargetName mismatch got: '{got}' wanted: '{wanted}'&quot;, got=service, wanted=self.service)
</ins><span class="cx">             kerberos.authGSSServerClean(context)
</span><span class="cx">             raise error.UnauthorizedLogin('Bad credentials: wrong target name %s' % (targetname,))
</span><span class="cx"> 
</span><span class="lines">@@ -294,7 +294,7 @@
</span><span class="cx">         try:
</span><span class="cx">             kerberos.authGSSServerClean(context)
</span><span class="cx">         except kerberos.GSSError, ex:
</span><del>-            self.log.error(&quot;authGSSServerClean: %s&quot; % (ex[0][0], ex[1][0],))
</del><ins>+            self.log.error(&quot;authGSSServerClean: {ex0}({ex1})&quot;, ex0=ex[0][0], ex1=ex[1][0])
</ins><span class="cx">             raise error.LoginFailed('Authentication System Failure %s(%s)' % (ex[0][0], ex[1][0],))
</span><span class="cx"> 
</span><span class="cx">         # If we successfully decoded and verified the Kerberos credentials we need to add the Kerberos
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavcaldavxmlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/caldavxml.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/caldavxml.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/caldavxml.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -122,16 +122,16 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><span class="cx">         if self.start is not None and self.start.isDateOnly():
</span><del>-            log.info(&quot;start attribute in &lt;time-range&gt; is not a date-time: %s&quot; % (self.start,))
</del><ins>+            log.info(&quot;start attribute in &lt;time-range&gt; is not a date-time: {start}&quot;, start=self.start)
</ins><span class="cx">             return False
</span><span class="cx">         if self.end is not None and self.end.isDateOnly():
</span><del>-            log.info(&quot;end attribute in &lt;time-range&gt; is not a date-time: %s&quot; % (self.end,))
</del><ins>+            log.info(&quot;end attribute in &lt;time-range&gt; is not a date-time: {end}&quot;, end=self.end)
</ins><span class="cx">             return False
</span><span class="cx">         if self.start is not None and not self.start.utc():
</span><del>-            log.info(&quot;start attribute in &lt;time-range&gt; is not UTC: %s&quot; % (self.start,))
</del><ins>+            log.info(&quot;start attribute in &lt;time-range&gt; is not UTC: {start}&quot;, start=self.start)
</ins><span class="cx">             return False
</span><span class="cx">         if self.end is not None and not self.end.utc():
</span><del>-            log.info(&quot;end attribute in &lt;time-range&gt; is not UTC: %s&quot; % (self.end,))
</del><ins>+            log.info(&quot;end attribute in &lt;time-range&gt; is not UTC: {end}&quot;, end=self.end)
</ins><span class="cx">             return False
</span><span class="cx"> 
</span><span class="cx">         # No other tests
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavclientgeturlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/geturl.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/geturl.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/geturl.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -113,6 +113,6 @@
</span><span class="cx">         yield whenFinished
</span><span class="cx">         response.data = protocol.data
</span><span class="cx">     else:
</span><del>-        log.error(&quot;Failed getURL: %s&quot; % (url,))
</del><ins>+        log.error(&quot;Failed getURL: {url}&quot;, url=url)
</ins><span class="cx"> 
</span><span class="cx">     returnValue(response)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavclientpoolpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/pool.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/pool.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/pool.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -177,8 +177,10 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         self._pendingConnects += 1
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Initating new client connection to: %r&quot; % (
-            self._endpoint,))
</del><ins>+        self.log.debug(
+            &quot;Initiating new client connection to: {endpoint!r}&quot;,
+            endpoint=self._endpoint,
+        )
</ins><span class="cx">         self._logClientStats()
</span><span class="cx"> 
</span><span class="cx">         factory = self.clientFactory(self._reactor)
</span><span class="lines">@@ -272,12 +274,12 @@
</span><span class="cx">                 response = (yield self._submitRequest(request, args, kwargs))
</span><span class="cx"> 
</span><span class="cx">             except (ConnectionLost, ConnectionDone, ConnectError), e:
</span><del>-                self.log.error(&quot;HTTP pooled client connection error (attempt: %d) - retrying: %s&quot; % (ctr + 1, e,))
</del><ins>+                self.log.error(&quot;HTTP pooled client connection error (attempt: {ctr}) - retrying: {ex}&quot;, ctr=ctr + 1, ex=e)
</ins><span class="cx">                 continue
</span><span class="cx"> 
</span><span class="cx">             # TODO: find the proper cause of these assertions and fix
</span><span class="cx">             except (AssertionError,), e:
</span><del>-                self.log.error(&quot;HTTP pooled client connection assertion error (attempt: %d) - retrying: %s&quot; % (ctr + 1, e,))
</del><ins>+                self.log.error(&quot;HTTP pooled client connection assertion error (attempt: {ctr}) - retrying: {ex}&quot;, ctr=ctr + 1, ex=e)
</ins><span class="cx">                 continue
</span><span class="cx"> 
</span><span class="cx">             else:
</span><span class="lines">@@ -307,7 +309,7 @@
</span><span class="cx">         elif len(self._busyClients) + self._pendingConnects &gt;= self._maxClients:
</span><span class="cx">             d = Deferred()
</span><span class="cx">             self._pendingRequests.append((d, request, args, kwargs))
</span><del>-            self.log.debug(&quot;Request queued: %s, %r, %r&quot; % (request, args, kwargs))
</del><ins>+            self.log.debug(&quot;Request queued: {req}, {args!r}, {kwargs!r}&quot;, req=request, args=args, kwargs=kwargs)
</ins><span class="cx">             self._logClientStats()
</span><span class="cx"> 
</span><span class="cx">         else:
</span><span class="lines">@@ -319,12 +321,11 @@
</span><span class="cx"> 
</span><span class="cx">     def _logClientStats(self):
</span><span class="cx">         self.log.debug(
</span><del>-            &quot;Clients #free: %d, #busy: %d, #pending: %d, #queued: %d&quot; % (
-                len(self._freeClients),
-                len(self._busyClients),
-                self._pendingConnects,
-                len(self._pendingRequests)
-            )
</del><ins>+            &quot;Clients #free: {free}, #busy: {busy}, #pending: {pending}, #queued: {queued}&quot;,
+            free=len(self._freeClients),
+            busy=len(self._busyClients),
+            pending=self._pendingConnects,
+            queued=len(self._pendingRequests)
</ins><span class="cx">         )
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -340,7 +341,7 @@
</span><span class="cx">         elif client in self._freeClients:
</span><span class="cx">             self._freeClients.remove(client)
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Removed client: %r&quot; % (client,))
</del><ins>+        self.log.debug(&quot;Removed client: {client!r}&quot;, client=client)
</ins><span class="cx">         self._logClientStats()
</span><span class="cx"> 
</span><span class="cx">         self._processPending()
</span><span class="lines">@@ -358,7 +359,7 @@
</span><span class="cx"> 
</span><span class="cx">         self._busyClients.add(client)
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Busied client: %r&quot; % (client,))
</del><ins>+        self.log.debug(&quot;Busied client: {client!r}&quot;, client=client)
</ins><span class="cx">         self._logClientStats()
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -376,7 +377,7 @@
</span><span class="cx">         if self.shutdown_deferred and self._isIdle():
</span><span class="cx">             self.shutdown_deferred.callback(None)
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Freed client: %r&quot; % (client,))
</del><ins>+        self.log.debug(&quot;Freed client: {client!r}&quot;, client=client)
</ins><span class="cx">         self._logClientStats()
</span><span class="cx"> 
</span><span class="cx">         self._processPending()
</span><span class="lines">@@ -386,8 +387,10 @@
</span><span class="cx">         if len(self._pendingRequests) &gt; 0:
</span><span class="cx">             d, request, args, kwargs = self._pendingRequests.pop(0)
</span><span class="cx"> 
</span><del>-            self.log.debug(&quot;Performing Queued Request: %s, %r, %r&quot; % (
-                request, args, kwargs))
</del><ins>+            self.log.debug(
+                &quot;Performing Queued Request: {req}, {args!r}, {kwargs!r}&quot;,
+                req=request, args=args, kwargs=kwargs
+            )
</ins><span class="cx">             self._logClientStats()
</span><span class="cx"> 
</span><span class="cx">             _ign_d = self._submitRequest(request, *args, **kwargs)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavclientreverseproxypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/reverseproxy.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/reverseproxy.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/client/reverseproxy.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">         @return: Deferred L{Response}
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-        self.log.info(&quot;%s %s %s&quot; % (request.method, request.uri, &quot;HTTP/%s.%s&quot; % request.clientproto))
</del><ins>+        self.log.info(&quot;{method} {uri} {proto}&quot;, method=request.method, uri=request.uri, proto=&quot;HTTP/%s.%s&quot; % request.clientproto)
</ins><span class="cx"> 
</span><span class="cx">         # Check for multi-hop
</span><span class="cx">         if not self.allowMultiHop:
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavdatabasepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/database.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/database.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/database.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -137,16 +137,20 @@
</span><span class="cx">                     if (version != self._db_version()) or (dbtype != self._db_type()):
</span><span class="cx"> 
</span><span class="cx">                         if dbtype != self._db_type():
</span><del>-                            log.error(&quot;Database %s has different type (%s vs. %s)&quot;
-                                      % (self.dbID, dbtype, self._db_type()))
</del><ins>+                            log.error(
+                                &quot;Database {db} has different type ({t1} vs. {t2})&quot;,
+                                db=self.dbID, t1=dbtype, t2=self._db_type()
+                            )
</ins><span class="cx"> 
</span><span class="cx">                             # Delete this index and start over
</span><span class="cx">                             yield self._db_remove()
</span><span class="cx">                             yield self._db_init()
</span><span class="cx"> 
</span><span class="cx">                         elif version != self._db_version():
</span><del>-                            log.error(&quot;Database %s has different schema (v.%s vs. v.%s)&quot;
-                                      % (self.dbID, version, self._db_version()))
</del><ins>+                            log.error(
+                                &quot;Database {db} has different schema (v.{v1} vs. v.{v2})&quot;,
+                                db=self.dbID, v1=version, v2=self._db_version()
+                            )
</ins><span class="cx"> 
</span><span class="cx">                             # Upgrade the DB
</span><span class="cx">                             yield self._db_upgrade(version)
</span><span class="lines">@@ -167,7 +171,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 self.pool.close()
</span><span class="cx">             except Exception, e:
</span><del>-                log.error(&quot;Error whilst closing connection pool: %s&quot; % (e,))
</del><ins>+                log.error(&quot;Error whilst closing connection pool: {ex}&quot;, ex=e)
</ins><span class="cx">             self.pool = None
</span><span class="cx">             self.initialized = False
</span><span class="cx"> 
</span><span class="lines">@@ -183,7 +187,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 yield self._db_empty_data_tables()
</span><span class="cx">             except Exception, e:
</span><del>-                log.error(&quot;Error in database clean: %s&quot; % (e,))
</del><ins>+                log.error(&quot;Error in database clean: {ex}&quot;, ex=e)
</ins><span class="cx">                 self.close()
</span><span class="cx">             else:
</span><span class="cx">                 break
</span><span class="lines">@@ -200,7 +204,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 yield self._db_execute(sql, *query_params)
</span><span class="cx">             except Exception, e:
</span><del>-                log.error(&quot;Error in database execute: %s&quot; % (e,))
</del><ins>+                log.error(&quot;Error in database execute: {ex}&quot;, ex=e)
</ins><span class="cx">                 self.close()
</span><span class="cx">             else:
</span><span class="cx">                 break
</span><span class="lines">@@ -217,7 +221,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 yield self._db_execute_script(script)
</span><span class="cx">             except Exception, e:
</span><del>-                log.error(&quot;Error in database executescript: %s&quot; % (e,))
</del><ins>+                log.error(&quot;Error in database executescript: {ex}&quot;, ex=e)
</ins><span class="cx">                 self.close()
</span><span class="cx">             else:
</span><span class="cx">                 break
</span><span class="lines">@@ -234,7 +238,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 result = (yield self._db_all_values_for_sql(sql, *query_params))
</span><span class="cx">             except Exception, e:
</span><del>-                log.error(&quot;Error in database query: %s&quot; % (e,))
</del><ins>+                log.error(&quot;Error in database query: {ex}&quot;, ex=e)
</ins><span class="cx">                 self.close()
</span><span class="cx">             else:
</span><span class="cx">                 break
</span><span class="lines">@@ -253,7 +257,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 result = (yield self._db_values_for_sql(sql, *query_params))
</span><span class="cx">             except Exception, e:
</span><del>-                log.error(&quot;Error in database queryList: %s&quot; % (e,))
</del><ins>+                log.error(&quot;Error in database queryList: {ex}&quot;, ex=e)
</ins><span class="cx">                 self.close()
</span><span class="cx">             else:
</span><span class="cx">                 break
</span><span class="lines">@@ -272,7 +276,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 result = (yield self._db_value_for_sql(sql, *query_params))
</span><span class="cx">             except Exception, e:
</span><del>-                log.error(&quot;Error in database queryOne: %s&quot; % (e,))
</del><ins>+                log.error(&quot;Error in database queryOne: {ex}&quot;, ex=e)
</ins><span class="cx">                 self.close()
</span><span class="cx">             else:
</span><span class="cx">                 break
</span><span class="lines">@@ -303,7 +307,7 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Initialise the underlying database tables.
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        log.info(&quot;Initializing database %s&quot; % (self.dbID,))
</del><ins>+        log.info(&quot;Initializing database {db}&quot;, db=self.dbID)
</ins><span class="cx"> 
</span><span class="cx">         # TODO we need an exclusive lock of some kind here to prevent a race condition
</span><span class="cx">         # in which multiple processes try to create the tables.
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectoryaugmentpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/augment.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/augment.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/augment.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -363,13 +363,13 @@
</span><span class="cx">                 try:
</span><span class="cx">                     uid = pwd.getpwnam(config.UserName).pw_uid
</span><span class="cx">                 except KeyError:
</span><del>-                    log.error(&quot;User not found: %s&quot; % (config.UserName,))
</del><ins>+                    log.error(&quot;User not found: {user}&quot;, user=config.UserName)
</ins><span class="cx">             gid = -1
</span><span class="cx">             if config.GroupName:
</span><span class="cx">                 try:
</span><span class="cx">                     gid = grp.getgrnam(config.GroupName).gr_gid
</span><span class="cx">                 except KeyError:
</span><del>-                    log.error(&quot;Group not found: %s&quot; % (config.GroupName,))
</del><ins>+                    log.error(&quot;Group not found: {grp}&quot;, grp=config.GroupName)
</ins><span class="cx">             if uid != -1 and gid != -1:
</span><span class="cx">                 os.chown(xmlfile, uid, gid)
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectorycalendarpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/calendar.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/calendar.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/calendar.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -305,7 +305,7 @@
</span><span class="cx">         def gotACL(wikiACL):
</span><span class="cx">             if wikiACL is not None:
</span><span class="cx">                 # ACL depends on wiki server...
</span><del>-                log.debug(&quot;Wiki ACL: %s&quot; % (wikiACL.toxml(),))
</del><ins>+                log.debug(&quot;Wiki ACL: {acl}&quot;, acl=wikiACL.toxml())
</ins><span class="cx">                 return succeed(wikiACL)
</span><span class="cx">             else:
</span><span class="cx">                 # ...otherwise permissions are fixed, and are not subject to
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectorycommonpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/common.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/common.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/common.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -69,12 +69,14 @@
</span><span class="cx">         name = record.uid
</span><span class="cx"> 
</span><span class="cx">         if record is None:
</span><del>-            log.debug(&quot;No directory record with UID %r&quot; % (name,))
</del><ins>+            log.debug(&quot;No directory record with UID {name}&quot;, name=name)
</ins><span class="cx">             returnValue(None)
</span><span class="cx"> 
</span><span class="cx">         if not getattr(record, self.enabledAttribute, False):
</span><del>-            log.debug(&quot;Directory record %r is not enabled for %s&quot; % (
-                record, self.homeResourceTypeName))
</del><ins>+            log.debug(
+                &quot;Directory record {rec!r} is not enabled for {type}&quot;,
+                rec=record, type=self.homeResourceTypeName
+            )
</ins><span class="cx">             returnValue(None)
</span><span class="cx"> 
</span><span class="cx">         assert len(name) &gt; 4, &quot;Directory record has an invalid GUID: %r&quot; % (
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectoryprincipalpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/principal.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/principal.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/principal.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> 
</span><span class="cx">         if wikiACL is not None:
</span><span class="cx">             # ACL depends on wiki server...
</span><del>-            log.debug(&quot;Wiki ACL: %s&quot; % (wikiACL.toxml(),))
</del><ins>+            log.debug(&quot;Wiki ACL: {acl}&quot;, acl=wikiACL.toxml())
</ins><span class="cx">             returnValue(wikiACL)
</span><span class="cx">         else:
</span><span class="cx">             # ...otherwise permissions are fixed, and are not subject to
</span><span class="lines">@@ -398,7 +398,7 @@
</span><span class="cx">             if record is not None and record.hasCalendars:
</span><span class="cx">                 returnValue((yield self.principalForRecord(record)))
</span><span class="cx"> 
</span><del>-        log.debug(&quot;No principal for calendar user address: %r&quot; % (address,))
</del><ins>+        log.debug(&quot;No principal for calendar user address: {addr}&quot;, addr=address)
</ins><span class="cx">         returnValue(None)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -413,7 +413,7 @@
</span><span class="cx">     ##
</span><span class="cx"> 
</span><span class="cx">     def createSimilarFile(self, path):
</span><del>-        log.error(&quot;Attempt to create clone %r of resource %r&quot; % (path, self))
</del><ins>+        log.error(&quot;Attempt to create clone {path} of resource {rsrc!r}&quot;, path=path, rsrc=self)
</ins><span class="cx">         raise HTTPError(responsecode.NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -477,7 +477,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def createSimilarFile(self, path):
</span><del>-        log.error(&quot;Attempt to create clone %r of resource %r&quot; % (path, self))
</del><ins>+        log.error(&quot;Attempt to create clone {path} of resource {rsrc!r}&quot;, path=path, rsrc=self)
</ins><span class="cx">         raise HTTPError(responsecode.NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -499,8 +499,10 @@
</span><span class="cx">                     for shortName in getattr(record, &quot;shortNames&quot;, []):
</span><span class="cx">                         children.append(shortName)
</span><span class="cx">             except AttributeError:
</span><del>-                log.warn(&quot;Cannot list children of record type {rt}&quot;,
-                         rt=self.recordType.name)
</del><ins>+                log.warn(
+                    &quot;Cannot list children of record type {rt}&quot;,
+                    rt=self.recordType.name
+                )
</ins><span class="cx">             returnValue(children)
</span><span class="cx"> 
</span><span class="cx">         else:
</span><span class="lines">@@ -562,7 +564,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def createSimilarFile(self, path):
</span><del>-        log.error(&quot;Attempt to create clone %r of resource %r&quot; % (path, self))
</del><ins>+        log.error(&quot;Attempt to create clone {path} of resource {rsrc!r}&quot;, path=path, rsrc=self)
</ins><span class="cx">         raise HTTPError(responsecode.NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -581,7 +583,7 @@
</span><span class="cx">         record = (yield self.directory.recordWithUID(primaryUID))
</span><span class="cx">         primaryPrincipal = (yield self.principalForRecord(record))
</span><span class="cx">         if primaryPrincipal is None:
</span><del>-            log.info(&quot;No principal found for UID: %s&quot; % (name,))
</del><ins>+            log.info(&quot;No principal found for UID: {name}&quot;, name=name)
</ins><span class="cx">             returnValue(None)
</span><span class="cx"> 
</span><span class="cx">         if subType is None:
</span><span class="lines">@@ -1035,7 +1037,7 @@
</span><span class="cx">                 if relative not in records:
</span><span class="cx">                     found = (yield self.parent.principalForRecord(relative))
</span><span class="cx">                     if found is None:
</span><del>-                        log.error(&quot;No principal found for directory record: %r&quot; % (relative,))
</del><ins>+                        log.error(&quot;No principal found for directory record: {rec!r}&quot;, rec=relative)
</ins><span class="cx">                     else:
</span><span class="cx">                         if proxy:
</span><span class="cx">                             if proxy == &quot;read-write&quot;:
</span><span class="lines">@@ -1194,7 +1196,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def createSimilarFile(self, path):
</span><del>-        log.error(&quot;Attempt to create clone %r of resource %r&quot; % (path, self))
</del><ins>+        log.error(&quot;Attempt to create clone {path} of resource {rsrc!r}&quot;, path=path, rsrc=self)
</ins><span class="cx">         raise HTTPError(responsecode.NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectoryutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/util.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/util.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directory/util.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx">                 yield item
</span><span class="cx">             yield &quot;\n&quot;
</span><span class="cx">     except Exception, e:
</span><del>-        log.error(&quot;Exception while rendering: %s&quot; % (e,))
</del><ins>+        log.error(&quot;Exception while rendering: {ex}&quot;, ex=e)
</ins><span class="cx">         Failure().printTraceback()
</span><span class="cx">         yield &quot;  ** %s **: %s\n&quot; % (e.__class__.__name__, e)
</span><span class="cx">     if not thereAreAny:
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavdirectorybackedaddressbookpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directorybackedaddressbook.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directorybackedaddressbook.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/directorybackedaddressbook.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -80,7 +80,8 @@
</span><span class="cx">         if self.directory is None:
</span><span class="cx">             log.info(
</span><span class="cx">                 &quot;Setting search directory to {principalDirectory}&quot;,
</span><del>-                principalDirectory=self.principalDirectory)
</del><ins>+                principalDirectory=self.principalDirectory
+            )
</ins><span class="cx">             self.directory = self.principalDirectory
</span><span class="cx">             # future: instantiate another directory based on /Search/Contacts (?)
</span><span class="cx"> 
</span><span class="lines">@@ -162,8 +163,10 @@
</span><span class="cx">         Get vCards for a given addressBookFilter and addressBookQuery
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-        log.debug(&quot;doAddressBookDirectoryQuery: directory={directory} addressBookFilter={addressBookFilter}, addressBookQuery={addressBookQuery}, maxResults={maxResults}&quot;,
-                  directory=self.directory, addressBookFilter=addressBookFilter, addressBookQuery=addressBookQuery, maxResults=maxResults)
</del><ins>+        log.debug(
+            &quot;doAddressBookDirectoryQuery: directory={directory} addressBookFilter={addressBookFilter}, addressBookQuery={addressBookQuery}, maxResults={maxResults}&quot;,
+            directory=self.directory, addressBookFilter=addressBookFilter, addressBookQuery=addressBookQuery, maxResults=maxResults
+        )
</ins><span class="cx">         results = []
</span><span class="cx">         limited = False
</span><span class="cx">         maxQueryRecords = 0
</span><span class="lines">@@ -232,8 +235,10 @@
</span><span class="cx">                 allRecords = set()
</span><span class="cx">                 if fields:
</span><span class="cx">                     records = yield self.directory.recordsMatchingFields(fields, operand, queryRecordType)
</span><del>-                    log.debug(&quot;doAddressBookDirectoryQuery: recordsMatchingFields({f}, {o}): #records={n}, records={records!r}&quot;,
-                              f=fields, o=operand, n=len(records), records=records)
</del><ins>+                    log.debug(
+                        &quot;doAddressBookDirectoryQuery: recordsMatchingFields({f}, {o}): #records={n}, records={records!r}&quot;,
+                        f=fields, o=operand, n=len(records), records=records
+                    )
</ins><span class="cx">                     allRecords = set(records)
</span><span class="cx">                 else:
</span><span class="cx">                     recordTypes = set([queryRecordType]) if queryRecordType else set(self.directory.recordTypes()) &amp; set(recordTypeToVCardKindMap.keys())
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavextensionspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/extensions.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/extensions.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/extensions.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">         # Only handle Depth: 0
</span><span class="cx">         depth = request.headers.getHeader(&quot;depth&quot;, &quot;0&quot;)
</span><span class="cx">         if depth != &quot;0&quot;:
</span><del>-            log.error(&quot;Error in principal-property-search REPORT, Depth set to %s&quot; % (depth,))
</del><ins>+            log.error(&quot;Error in principal-property-search REPORT, Depth set to {depth}&quot;, depth=depth)
</ins><span class="cx">             raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, &quot;Depth %s not allowed&quot; % (depth,)))
</span><span class="cx"> 
</span><span class="cx">         # Get any limit value from xml
</span><span class="lines">@@ -319,7 +319,7 @@
</span><span class="cx">         # Only handle Depth: 0
</span><span class="cx">         depth = request.headers.getHeader(&quot;depth&quot;, &quot;0&quot;)
</span><span class="cx">         if depth != &quot;0&quot;:
</span><del>-            log.error(&quot;Error in calendarserver-principal-search REPORT, Depth set to %s&quot; % (depth,))
</del><ins>+            log.error(&quot;Error in calendarserver-principal-search REPORT, Depth set to {depth}&quot;, depth=depth)
</ins><span class="cx">             raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, &quot;Depth %s not allowed&quot; % (depth,)))
</span><span class="cx"> 
</span><span class="cx">         tokens, context, applyTo, clientLimit, propElement = extractCalendarServerPrincipalSearchData(calendarserver_principal_search)
</span><span class="lines">@@ -484,9 +484,11 @@
</span><span class="cx">                 f.trap(HTTPError)
</span><span class="cx">                 code = f.value.response.code
</span><span class="cx">                 if code == responsecode.NOT_FOUND:
</span><del>-                    log.error(&quot;Property {p} was returned by listProperties() &quot;
-                              &quot;but does not exist for resource {r}.&quot;,
-                              p=name, r=self.resource)
</del><ins>+                    log.error(
+                        &quot;Property {name} was returned by listProperties() &quot;
+                        &quot;but does not exist for resource {rsrc!r}.&quot;,
+                        name=name, rsrc=self.resource
+                    )
</ins><span class="cx">                     return (name, None)
</span><span class="cx">                 if code == responsecode.UNAUTHORIZED:
</span><span class="cx">                     return (name, accessDeniedValue)
</span><span class="lines">@@ -954,7 +956,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def get(self, qname, uid=None):
</span><del>-        # self.log.debug(&quot;Get: %r, %r&quot; % (self.resource.fp.path, qname))
</del><ins>+        # self.log.debug(&quot;Get: {p}, {n}&quot;, p=self.resource.fp.path, n=qname)
</ins><span class="cx"> 
</span><span class="cx">         cache = self._cache()
</span><span class="cx"> 
</span><span class="lines">@@ -963,7 +965,7 @@
</span><span class="cx">         if cachedQname in cache:
</span><span class="cx">             property = cache.get(cachedQname, None)
</span><span class="cx">             if property is None:
</span><del>-                self.log.debug(&quot;Cache miss: %r, %r, %r&quot; % (self, self.resource.fp.path, qname))
</del><ins>+                self.log.debug(&quot;Cache miss: {s!r}, {p}, {n}&quot;, s=self, p=self.resource.fp.path, n=qname)
</ins><span class="cx">                 try:
</span><span class="cx">                     property = self.propertyStore.get(qname, uid)
</span><span class="cx">                 except HTTPError:
</span><span class="lines">@@ -977,7 +979,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def set(self, property, uid=None):
</span><del>-        # self.log.debug(&quot;Set: %r, %r&quot; % (self.resource.fp.path, property))
</del><ins>+        # self.log.debug(&quot;Set: {p}, {prop!r}&quot;, p=self.resource.fp.path, prop=property)
</ins><span class="cx"> 
</span><span class="cx">         cache = self._cache()
</span><span class="cx"> 
</span><span class="lines">@@ -989,7 +991,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def contains(self, qname, uid=None):
</span><del>-        # self.log.debug(&quot;Contains: %r, %r&quot; % (self.resource.fp.path, qname))
</del><ins>+        # self.log.debug(&quot;Contains: {p}, {n}&quot;, p=self.resource.fp.path, n=qname)
</ins><span class="cx"> 
</span><span class="cx">         cachedQname = qname + (uid,)
</span><span class="cx"> 
</span><span class="lines">@@ -1002,14 +1004,14 @@
</span><span class="cx">                 raise
</span><span class="cx"> 
</span><span class="cx">         if cachedQname in cache:
</span><del>-            # self.log.debug(&quot;Contains cache hit: %r, %r, %r&quot; % (self, self.resource.fp.path, qname))
</del><ins>+            # self.log.debug(&quot;Contains cache hit: {s!r}, {p}, {n}&quot;, s=self, p=self.resource.fp.path, n=qname)
</ins><span class="cx">             return True
</span><span class="cx">         else:
</span><span class="cx">             return False
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def delete(self, qname, uid=None):
</span><del>-        # self.log.debug(&quot;Delete: %r, %r&quot; % (self.resource.fp.path, qname))
</del><ins>+        # self.log.debug(&quot;Delete: {p}, {n}&quot;, p=self.resource.fp.path, n=qname)
</ins><span class="cx"> 
</span><span class="cx">         cachedQname = qname + (uid,)
</span><span class="cx"> 
</span><span class="lines">@@ -1020,7 +1022,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def list(self, uid=None, filterByUID=True):
</span><del>-        # self.log.debug(&quot;List: %r&quot; % (self.resource.fp.path,))
</del><ins>+        # self.log.debug(&quot;List: {p}&quot;, p=self.resource.fp.path)
</ins><span class="cx">         keys = self._cache().iterkeys()
</span><span class="cx">         if filterByUID:
</span><span class="cx">             return [
</span><span class="lines">@@ -1034,7 +1036,7 @@
</span><span class="cx"> 
</span><span class="cx">     def _cache(self):
</span><span class="cx">         if not hasattr(self, &quot;_data&quot;):
</span><del>-            # self.log.debug(&quot;Cache init: %r&quot; % (self.resource.fp.path,))
</del><ins>+            # self.log.debug(&quot;Cache init: {p}&quot;, p=self.resource.fp.path)
</ins><span class="cx">             self._data = dict(
</span><span class="cx">                 (name, None)
</span><span class="cx">                 for name in self.propertyStore.list(filterByUID=False)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavfreebusyurlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/freebusyurl.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/freebusyurl.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/freebusyurl.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -260,7 +260,7 @@
</span><span class="cx">         try:
</span><span class="cx">             inbox = (yield request.locateResource(inboxURL))
</span><span class="cx">         except:
</span><del>-            log.error(&quot;No schedule inbox for principal: %s&quot; % (principal,))
</del><ins>+            log.error(&quot;No schedule inbox for principal: {p}&quot;, p=principal)
</ins><span class="cx">             inbox = None
</span><span class="cx">         if inbox is None:
</span><span class="cx">             raise HTTPError(StatusResponse(responsecode.INTERNAL_SERVER_ERROR, &quot;No schedule inbox for principal: %s&quot; % (principal,)))
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavicalpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/ical.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/ical.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/ical.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -1892,10 +1892,10 @@
</span><span class="cx">             cannot be fixed.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         if self.name() != &quot;VCALENDAR&quot;:
</span><del>-            log.debug(&quot;Not a calendar: {0}&quot;.format(self,))
</del><ins>+            log.debug(&quot;Not a calendar: {s!r}&quot;, s=self)
</ins><span class="cx">             raise InvalidICalendarDataError(&quot;Not a calendar&quot;)
</span><span class="cx">         if not self.resourceType():
</span><del>-            log.debug(&quot;Unknown resource type: {0}&quot;.format(self,))
</del><ins>+            log.debug(&quot;Unknown resource type: {s!r}&quot;, s=self)
</ins><span class="cx">             raise InvalidICalendarDataError(&quot;Unknown resource type&quot;)
</span><span class="cx"> 
</span><span class="cx">         # Do underlying iCalendar library validation with data fix
</span><span class="lines">@@ -1908,11 +1908,11 @@
</span><span class="cx">             unfixed.extend(runfixed)
</span><span class="cx"> 
</span><span class="cx">         if unfixed:
</span><del>-            log.debug(&quot;Calendar data had unfixable problems:\n  {0}&quot;.format(&quot;\n  &quot;.join(unfixed),))
</del><ins>+            log.debug(&quot;Calendar data had unfixable problems:\n  {d}&quot;, d=&quot;\n  &quot;.join(unfixed))
</ins><span class="cx">             if doRaise:
</span><span class="cx">                 raise InvalidICalendarDataError(&quot;Calendar data had unfixable problems:\n  {0}&quot;.format(&quot;\n  &quot;.join(unfixed),))
</span><span class="cx">         if fixed:
</span><del>-            log.debug(&quot;Calendar data had fixable problems:\n  {0}&quot;.format(&quot;\n  &quot;.join(fixed),))
</del><ins>+            log.debug(&quot;Calendar data had fixable problems:\n  {d}&quot;, d=&quot;\n  &quot;.join(fixed))
</ins><span class="cx"> 
</span><span class="cx">         return fixed, unfixed
</span><span class="cx"> 
</span><span class="lines">@@ -2099,7 +2099,7 @@
</span><span class="cx">                 # If it does we will have to reinstate this check but only after we have checked for implicit.
</span><span class="cx"> # UNCOMMENT OUT master_recurring AND got_override ASSIGNMENTS ABOVE
</span><span class="cx"> #                if got_override and got_master and not master_recurring:
</span><del>-#                    msg = &quot;Calendar resources must have a recurring master component if there is an overridden one (%s)&quot; % (subcomponent.propertyValue(&quot;UID&quot;),)
</del><ins>+#                    msg = &quot;Calendar resources must have a recurring master component if there is an overridden one ({uid})&quot;.format(uid=subcomponent.propertyValue(&quot;UID&quot;),)
</ins><span class="cx"> #                    log.debug(msg)
</span><span class="cx"> #                    raise InvalidICalendarDataError(msg)
</span><span class="cx"> 
</span><span class="lines">@@ -2131,7 +2131,7 @@
</span><span class="cx">         for timezone in timezones:
</span><span class="cx">             if timezone not in timezone_refs:
</span><span class="cx">                 log.debug(
</span><del>-                    &quot;Timezone {0} is not referenced by any non-timezone component&quot;.format(timezone,)
</del><ins>+                    &quot;Timezone {tz} is not referenced by any non-timezone component&quot;, tz=timezone
</ins><span class="cx">                 )
</span><span class="cx"> 
</span><span class="cx">         # TZIDs without a VTIMEZONE must be available in the server's TZ database
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavlocalizationpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/localization.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/localization.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/localization.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -383,7 +383,7 @@
</span><span class="cx">     # Do we have an Apple translations directory?
</span><span class="cx">     if lprojRoot and gnuRoot and os.path.exists(lprojRoot):
</span><span class="cx"> 
</span><del>-        log.info(&quot;Looking for Apple .lproj directories in %s&quot; % (lprojRoot,))
</del><ins>+        log.info(&quot;Looking for Apple .lproj directories in {r}&quot;, r=lprojRoot)
</ins><span class="cx"> 
</span><span class="cx">         # Make sure the gnutext translations directory exists
</span><span class="cx">         if not os.path.exists(gnuRoot):
</span><span class="lines">@@ -391,8 +391,9 @@
</span><span class="cx">                 os.mkdir(gnuRoot)
</span><span class="cx">             except OSError:
</span><span class="cx">                 log.warn(
</span><del>-                    &quot;Could not create gnuttext translation directory: %s&quot;
-                    % (gnuRoot,))
</del><ins>+                    &quot;Could not create gnuttext translation directory: {r}&quot;,
+                    r=gnuRoot,
+                )
</ins><span class="cx">                 return
</span><span class="cx"> 
</span><span class="cx">         # Scan for Apple translations (directories ending in .lproj)
</span><span class="lines">@@ -413,16 +414,16 @@
</span><span class="cx">                         os.stat(stringsFile).st_mtime &gt;
</span><span class="cx">                         os.stat(moFile).st_mtime
</span><span class="cx">                     ):
</span><del>-                        log.info(&quot;Converting %s to %s&quot; % (stringsFile, moFile))
</del><ins>+                        log.info(&quot;Converting {s} to {m}&quot;, s=stringsFile, m=moFile)
</ins><span class="cx">                         try:
</span><span class="cx">                             convertStringsFile(stringsFile, moFile)
</span><span class="cx">                         except Exception, e:
</span><span class="cx">                             log.error(
</span><del>-                                &quot;Failed to convert %s to %s: %s&quot; %
-                                (stringsFile, moFile, e)
</del><ins>+                                &quot;Failed to convert {s} to {m}: {ex}&quot;,
+                                s=stringsFile, m=moFile, ex=e,
</ins><span class="cx">                             )
</span><span class="cx">                     else:
</span><del>-                        log.info(&quot;%s is up to date&quot; % (moFile,))
</del><ins>+                        log.info(&quot;{m} is up to date&quot;, m=moFile)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmemcacheclientpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacheclient.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacheclient.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacheclient.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -803,7 +803,7 @@
</span><span class="cx">                 log.debug(&quot;Memcacheclient check-and-set failed&quot;)
</span><span class="cx">                 raise TokenMismatchError(key)
</span><span class="cx"> 
</span><del>-            log.error(&quot;Memcacheclient %s command failed with result (%s)&quot; % (cmd, result))
</del><ins>+            log.error(&quot;Memcacheclient {cmd} command failed with result ({r})&quot;, cmd=cmd, r=result)
</ins><span class="cx"> 
</span><span class="cx">             return False
</span><span class="cx"> 
</span><span class="lines">@@ -1276,7 +1276,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def mark_dead(self, reason):
</span><del>-        log.error(&quot;Memcacheclient socket marked dead (%s)&quot; % (reason,))
</del><ins>+        log.error(&quot;Memcacheclient socket marked dead ({r})&quot;, r=reason)
</ins><span class="cx">         self.debuglog(&quot;MemCache: %s: %s.  Marking dead.&quot; % (self, reason))
</span><span class="cx">         self.deaduntil = time.time() + _Host._DEAD_RETRY
</span><span class="cx">         self.close_socket()
</span><span class="lines">@@ -1294,13 +1294,13 @@
</span><span class="cx">         try:
</span><span class="cx">             s.connect(self.address)
</span><span class="cx">         except socket.timeout, msg:
</span><del>-            log.error(&quot;Memcacheclient _get_socket() connection timed out (%s)&quot; % (msg,))
</del><ins>+            log.error(&quot;Memcacheclient _get_socket() connection timed out ({m})&quot;, m=msg)
</ins><span class="cx">             self.mark_dead(&quot;connect: %s&quot; % msg)
</span><span class="cx">             return None
</span><span class="cx">         except socket.error, msg:
</span><span class="cx">             if isinstance(msg, tuple):
</span><span class="cx">                 msg = msg[1]
</span><del>-            log.error(&quot;Memcacheclient _get_socket() connection error (%s)&quot; % (msg,))
</del><ins>+            log.error(&quot;Memcacheclient _get_socket() connection error ({m})&quot;, m=msg)
</ins><span class="cx">             self.mark_dead(&quot;connect: %s&quot; % msg)
</span><span class="cx">             return None
</span><span class="cx">         self.socket = s
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmemcachelockpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcachelock.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcachelock.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcachelock.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -68,19 +68,19 @@
</span><span class="cx">             if result:
</span><span class="cx">                 self._hasLock = True
</span><span class="cx">                 if waiting:
</span><del>-                    self.log.debug(&quot;Got lock after waiting on %s&quot; % (self._locktoken,))
</del><ins>+                    self.log.debug(&quot;Got lock after waiting on {t}&quot;, t=self._locktoken)
</ins><span class="cx">                 break
</span><span class="cx"> 
</span><span class="cx">             if self._timeout and time.time() &lt; timeout_at:
</span><span class="cx">                 waiting = True
</span><del>-                self.log.debug(&quot;Waiting for lock on %s&quot; % (self._locktoken,))
</del><ins>+                self.log.debug(&quot;Waiting for lock on {t}&quot;, t=self._locktoken)
</ins><span class="cx">                 pause = Deferred()
</span><span class="cx">                 def _timedDeferred():
</span><span class="cx">                     pause.callback(True)
</span><span class="cx">                 reactor.callLater(self._retry_interval, _timedDeferred)
</span><span class="cx">                 yield pause
</span><span class="cx">             else:
</span><del>-                self.log.debug(&quot;Timed out lock after waiting on %s&quot; % (self._locktoken,))
</del><ins>+                self.log.debug(&quot;Timed out lock after waiting on {t}&quot;, t=self._locktoken)
</ins><span class="cx">                 raise MemcacheLockTimeoutError()
</span><span class="cx"> 
</span><span class="cx">         returnValue(True)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmemcachepoolpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcachepool.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcachepool.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcachepool.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">             # The reactor is stopping; don't reconnect
</span><span class="cx">             return
</span><span class="cx"> 
</span><del>-        self.log.error(&quot;MemCache connection lost: %s&quot; % (reason,))
</del><ins>+        self.log.error(&quot;MemCache connection lost: {r}&quot;, r=reason)
</ins><span class="cx">         if self._protocolInstance is not None:
</span><span class="cx">             self.connectionPool.clientBusy(self._protocolInstance)
</span><span class="cx"> 
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Notify the connectionPool that we're unable to connect
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        self.log.error(&quot;MemCache connection failed: %s&quot; % (reason,))
</del><ins>+        self.log.error(&quot;MemCache connection failed: {r}&quot;, r=reason)
</ins><span class="cx">         if self._protocolInstance is not None:
</span><span class="cx">             self.connectionPool.clientBusy(self._protocolInstance)
</span><span class="cx"> 
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx">         @return: A L{Deferred} that fires with the L{IProtocol} instance.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         self.log.debug(
</span><del>-            &quot;Initiating new client connection to: %r&quot; % (self._endpoint,)
</del><ins>+            &quot;Initiating new client connection to: {r!r}&quot;, r=self._endpoint
</ins><span class="cx">         )
</span><span class="cx">         self._logClientStats()
</span><span class="cx"> 
</span><span class="lines">@@ -245,10 +245,10 @@
</span><span class="cx">             message and free the client.
</span><span class="cx">             &quot;&quot;&quot;
</span><span class="cx">             self.log.error(
</span><del>-                &quot;Memcache error: %s; request: %s %s&quot; % (
-                    failure.value, command,
-                    &quot; &quot;.join(args)[:self.REQUEST_LOGGING_SIZE],
-                )
</del><ins>+                &quot;Memcache error: {ex}; request: {cmd} {args}&quot;,
+                ex=failure.value,
+                cmd=command,
+                args=&quot; &quot;.join(args)[:self.REQUEST_LOGGING_SIZE],
</ins><span class="cx">             )
</span><span class="cx">             self.clientFree(client)
</span><span class="cx"> 
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx">             d = Deferred()
</span><span class="cx">             self._commands.append((d, command, args, kwargs))
</span><span class="cx">             self.log.debug(
</span><del>-                &quot;Command queued: %s, %r, %r&quot; % (command, args, kwargs)
</del><ins>+                &quot;Command queued: {c}, {a!r}, {k!r}&quot;, c=command, a=args, k=kwargs
</ins><span class="cx">             )
</span><span class="cx">             self._logClientStats()
</span><span class="cx"> 
</span><span class="lines">@@ -304,12 +304,11 @@
</span><span class="cx"> 
</span><span class="cx">     def _logClientStats(self):
</span><span class="cx">         self.log.debug(
</span><del>-            &quot;Clients #free: %d, #busy: %d, #pending: %d, #queued: %d&quot; % (
-                len(self._freeClients),
-                len(self._busyClients),
-                self._pendingConnects,
-                len(self._commands),
-            )
</del><ins>+            &quot;Clients #free: {f}, #busy: {b}, #pending: {p}, #queued: {q}&quot;,
+            f=len(self._freeClients),
+            b=len(self._busyClients),
+            p=self._pendingConnects,
+            q=len(self._commands),
</ins><span class="cx">         )
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -325,7 +324,7 @@
</span><span class="cx">         elif client in self._freeClients:
</span><span class="cx">             self._freeClients.remove(client)
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Removed client: %r&quot; % (client,))
</del><ins>+        self.log.debug(&quot;Removed client: {c!r}&quot;, c=client)
</ins><span class="cx">         self._logClientStats()
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -341,7 +340,7 @@
</span><span class="cx"> 
</span><span class="cx">         self._busyClients.add(client)
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Busied client: %r&quot; % (client,))
</del><ins>+        self.log.debug(&quot;Busied client: {c!r}&quot;, c=client)
</ins><span class="cx">         self._logClientStats()
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -363,8 +362,8 @@
</span><span class="cx">             d, command, args, kwargs = self._commands.pop(0)
</span><span class="cx"> 
</span><span class="cx">             self.log.debug(
</span><del>-                &quot;Performing Queued Command: %s, %r, %r&quot;
-                % (command, args, kwargs)
</del><ins>+                &quot;Performing Queued Command: {c}, {a}, {k}&quot;,
+                c=command, a=args, k=kwargs,
</ins><span class="cx">             )
</span><span class="cx">             self._logClientStats()
</span><span class="cx"> 
</span><span class="lines">@@ -373,7 +372,7 @@
</span><span class="cx"> 
</span><span class="cx">             _ign_d.addCallback(d.callback)
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Freed client: %r&quot; % (client,))
</del><ins>+        self.log.debug(&quot;Freed client: {c!r}&quot;, c=client)
</ins><span class="cx">         self._logClientStats()
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmemcachepropspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacheprops.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacheprops.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacheprops.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">         try:
</span><span class="cx">             childCache, token = propertyCache[key]
</span><span class="cx">         except KeyError:
</span><del>-            self.log.debug(&quot;No child property cache for %s&quot; % (child,))
</del><ins>+            self.log.debug(&quot;No child property cache for {c!r}&quot;, c=child)
</ins><span class="cx">             childCache, token = ({}, None)
</span><span class="cx"> 
</span><span class="cx">             # message = &quot;No child property cache for %s&quot; % (child,)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">             else:
</span><span class="cx">                 return {}
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Loading cache for %s&quot; % (self.collection,))
</del><ins>+        self.log.debug(&quot;Loading cache for {c}&quot;, c=self.collection)
</ins><span class="cx"> 
</span><span class="cx">         client = self.memcacheClient()
</span><span class="cx">         assert client is not None, &quot;OMG no cache!&quot;
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def _storeCache(self, cache):
</span><del>-        self.log.debug(&quot;Storing cache for %s&quot; % (self.collection,))
</del><ins>+        self.log.debug(&quot;Storing cache for {c}&quot;, c=self.collection)
</ins><span class="cx"> 
</span><span class="cx">         values = dict((
</span><span class="cx">             (self._keyForPath(path), props)
</span><span class="lines">@@ -242,7 +242,7 @@
</span><span class="cx">         elif not childNames:
</span><span class="cx">             return {}
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Building cache for %s&quot; % (self.collection,))
</del><ins>+        self.log.debug(&quot;Building cache for {c}&quot;, c=self.collection)
</ins><span class="cx"> 
</span><span class="cx">         cache = {}
</span><span class="cx"> 
</span><span class="lines">@@ -372,29 +372,32 @@
</span><span class="cx">                         &quot;No such property: %s%s&quot; % (uid if uid else &quot;&quot;, encodeXMLName(*qname))
</span><span class="cx">                     ))
</span><span class="cx"> 
</span><del>-            self.log.debug(&quot;Read for %s%s on %s&quot; % (
-                (&quot;{%s}:&quot; % (uid,)) if uid else &quot;&quot;,
-                qname,
-                self.childPropertyStore.resource.fp.path
-            ))
</del><ins>+            self.log.debug(
+                &quot;Read for {u}{q} on {p}&quot;,
+                u=(&quot;{%s}:&quot; % (uid,)) if uid else &quot;&quot;,
+                q=qname,
+                p=self.childPropertyStore.resource.fp.path
+            )
</ins><span class="cx">             return self.childPropertyStore.get(qname, uid=uid)
</span><span class="cx"> 
</span><span class="cx">         def set(self, property, uid=None):
</span><del>-            self.log.debug(&quot;Write for %s%s on %s&quot; % (
-                (&quot;{%s}:&quot; % (uid,)) if uid else &quot;&quot;,
-                property.qname(),
-                self.childPropertyStore.resource.fp.path
-            ))
</del><ins>+            self.log.debug(
+                &quot;Write for {u}{q} on {p}&quot;,
+                u=(&quot;{%s}:&quot; % (uid,)) if uid else &quot;&quot;,
+                q=property.qname(),
+                p=self.childPropertyStore.resource.fp.path
+            )
</ins><span class="cx"> 
</span><span class="cx">             self.parentPropertyCollection.setProperty(self.child, property, uid)
</span><span class="cx">             self.childPropertyStore.set(property, uid=uid)
</span><span class="cx"> 
</span><span class="cx">         def delete(self, qname, uid=None):
</span><del>-            self.log.debug(&quot;Delete for %s%s on %s&quot; % (
-                (&quot;{%s}:&quot; % (uid,)) if uid else &quot;&quot;,
-                qname,
-                self.childPropertyStore.resource.fp.path
-            ))
</del><ins>+            self.log.debug(
+                &quot;Delete for {u}{q} on {p}&quot;,
+                u=(&quot;{%s}:&quot; % (uid,)) if uid else &quot;&quot;,
+                q=qname,
+                p=self.childPropertyStore.resource.fp.path,
+            )
</ins><span class="cx"> 
</span><span class="cx">             self.parentPropertyCollection.deleteProperty(self.child, qname, uid)
</span><span class="cx">             self.childPropertyStore.delete(qname, uid=uid)
</span><span class="lines">@@ -405,11 +408,12 @@
</span><span class="cx">                 qnameuid = qname + (uid,)
</span><span class="cx">                 return qnameuid in propertyCache
</span><span class="cx"> 
</span><del>-            self.log.debug(&quot;Contains for %s%s on %s&quot; % (
-                (&quot;{%s}:&quot; % (uid,)) if uid else &quot;&quot;,
-                qname,
-                self.childPropertyStore.resource.fp.path,
-            ))
</del><ins>+            self.log.debug(
+                &quot;Contains for {u}{q} on {p}&quot;,
+                u=(&quot;{%s}:&quot; % (uid,)) if uid else &quot;&quot;,
+                q=qname,
+                p=self.childPropertyStore.resource.fp.path,
+            )
</ins><span class="cx">             return self.childPropertyStore.contains(qname, uid=uid)
</span><span class="cx"> 
</span><span class="cx">         def list(self, uid=None, filterByUID=True, cache=True):
</span><span class="lines">@@ -425,6 +429,7 @@
</span><span class="cx">                 else:
</span><span class="cx">                     return results
</span><span class="cx"> 
</span><del>-            self.log.debug(&quot;List for %s&quot;
-                           % (self.childPropertyStore.resource.fp.path,))
</del><ins>+            self.log.debug(
+                &quot;List for{p}&quot;, p=self.childPropertyStore.resource.fp.path
+            )
</ins><span class="cx">             return self.childPropertyStore.list(uid=uid, filterByUID=filterByUID)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmemcacherpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacher.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacher.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/memcacher.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx">         my_value = value
</span><span class="cx">         if self._pickle:
</span><span class="cx">             my_value = cPickle.dumps(value)
</span><del>-        self.log.debug(&quot;Adding Cache Token for %r&quot; % (key,))
</del><ins>+        self.log.debug(&quot;Adding Cache Token for {k!r}&quot;, k=key)
</ins><span class="cx">         return proto.add('%s:%s' % (self._namespace, self._normalizeKey(key)), my_value, expireTime=expireTime)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -299,7 +299,7 @@
</span><span class="cx">         my_value = value
</span><span class="cx">         if self._pickle:
</span><span class="cx">             my_value = cPickle.dumps(value)
</span><del>-        self.log.debug(&quot;Setting Cache Token for %r&quot; % (key,))
</del><ins>+        self.log.debug(&quot;Setting Cache Token for {k!r}&quot;, k=key)
</ins><span class="cx">         return proto.set('%s:%s' % (self._namespace, self._normalizeKey(key)), my_value, expireTime=expireTime)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -310,7 +310,7 @@
</span><span class="cx">         my_value = value
</span><span class="cx">         if self._pickle:
</span><span class="cx">             my_value = cPickle.dumps(value)
</span><del>-        self.log.debug(&quot;Setting Cache Token for %r&quot; % (key,))
</del><ins>+        self.log.debug(&quot;Setting Cache Token for {k!r}&quot;, k=key)
</ins><span class="cx">         return proto.checkAndSet('%s:%s' % (self._namespace, self._normalizeKey(key)), my_value, cas, expireTime=expireTime)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -326,24 +326,24 @@
</span><span class="cx">                 value = (identifier, value)
</span><span class="cx">             return value
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Getting Cache Token for %r&quot; % (key,))
</del><ins>+        self.log.debug(&quot;Getting Cache Token for {k!r}&quot;, k=key)
</ins><span class="cx">         d = self._getMemcacheProtocol().get('%s:%s' % (self._namespace, self._normalizeKey(key)), withIdentifier=withIdentifier)
</span><span class="cx">         d.addCallback(_gotit, withIdentifier)
</span><span class="cx">         return d
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def delete(self, key):
</span><del>-        self.log.debug(&quot;Deleting Cache Token for %r&quot; % (key,))
</del><ins>+        self.log.debug(&quot;Deleting Cache Token for {k!r}&quot;, k=key)
</ins><span class="cx">         return self._getMemcacheProtocol().delete('%s:%s' % (self._namespace, self._normalizeKey(key)))
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def incr(self, key, delta=1):
</span><del>-        self.log.debug(&quot;Incrementing Cache Token for %r&quot; % (key,))
</del><ins>+        self.log.debug(&quot;Incrementing Cache Token for {k!r}&quot;, k=key)
</ins><span class="cx">         return self._getMemcacheProtocol().incr('%s:%s' % (self._namespace, self._normalizeKey(key)), delta)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def decr(self, key, delta=1):
</span><del>-        self.log.debug(&quot;Decrementing Cache Token for %r&quot; % (key,))
</del><ins>+        self.log.debug(&quot;Decrementing Cache Token for {k!r}&quot;, k=key)
</ins><span class="cx">         return self._getMemcacheProtocol().incr('%s:%s' % (self._namespace, self._normalizeKey(key)), delta)
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodmkcalendarpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/mkcalendar.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/mkcalendar.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/mkcalendar.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     yield parent.authorize(request, (davxml.Bind(),))
</span><span class="cx"> 
</span><span class="cx">     if self.exists():
</span><del>-        log.error(&quot;Attempt to create collection where resource exists: %s&quot; % (self,))
</del><ins>+        log.error(&quot;Attempt to create collection where resource exists: {s!r}&quot;, s=self)
</ins><span class="cx">         raise HTTPError(ErrorResponse(
</span><span class="cx">             responsecode.FORBIDDEN,
</span><span class="cx">             (davxml.dav_namespace, &quot;resource-must-be-null&quot;),
</span><span class="lines">@@ -59,8 +59,7 @@
</span><span class="cx">         ))
</span><span class="cx"> 
</span><span class="cx">     if not parent.isCollection():
</span><del>-        log.error(&quot;Attempt to create collection with non-collection parent: %s&quot;
-                  % (self,))
</del><ins>+        log.error(&quot;Attempt to create collection with non-collection parent: {s!r}&quot;, s=self)
</ins><span class="cx">         raise HTTPError(ErrorResponse(
</span><span class="cx">             responsecode.CONFLICT,
</span><span class="cx">             (caldavxml.caldav_namespace, &quot;calendar-collection-location-ok&quot;),
</span><span class="lines">@@ -74,7 +73,7 @@
</span><span class="cx">         doc = (yield davXMLFromStream(request.stream))
</span><span class="cx">         yield self.createCalendar(request)
</span><span class="cx">     except ValueError, e:
</span><del>-        log.error(&quot;Error while handling MKCALENDAR: %s&quot; % (e,))
</del><ins>+        log.error(&quot;Error while handling MKCALENDAR: {ex}&quot;, ex=e)
</ins><span class="cx">         raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, str(e)))
</span><span class="cx"> 
</span><span class="cx">     set_supported_component_set = False
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodmkcolpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/mkcol.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/mkcol.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/mkcol.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -54,8 +54,7 @@
</span><span class="cx">     yield parent.authorize(request, (davxml.Bind(),))
</span><span class="cx"> 
</span><span class="cx">     if self.exists():
</span><del>-        log.error(&quot;Attempt to create collection where resource exists: %s&quot;
-                  % (self,))
</del><ins>+        log.error(&quot;Attempt to create collection where resource exists: {s!r}&quot;, s=self)
</ins><span class="cx">         raise HTTPError(ErrorResponse(
</span><span class="cx">             responsecode.FORBIDDEN,
</span><span class="cx">             (davxml.dav_namespace, &quot;resource-must-be-null&quot;),
</span><span class="lines">@@ -63,8 +62,7 @@
</span><span class="cx">         ))
</span><span class="cx"> 
</span><span class="cx">     if not parent.isCollection():
</span><del>-        log.error(&quot;Attempt to create collection with non-collection parent: %s&quot;
-                  % (self,))
</del><ins>+        log.error(&quot;Attempt to create collection with non-collection parent: {s!r}&quot;, s=self)
</ins><span class="cx">         raise HTTPError(ErrorResponse(
</span><span class="cx">             responsecode.CONFLICT,
</span><span class="cx">             (davxml.dav_namespace, &quot;collection-location-ok&quot;),
</span><span class="lines">@@ -99,7 +97,7 @@
</span><span class="cx">     try:
</span><span class="cx">         doc = (yield davXMLFromStream(request.stream))
</span><span class="cx">     except ValueError, e:
</span><del>-        log.error(&quot;Error while handling MKCOL: %s&quot; % (e,))
</del><ins>+        log.error(&quot;Error while handling MKCOL: {ex}&quot;, ex=e)
</ins><span class="cx">         # TODO: txweb2.dav 'MKCOL' tests demand this particular response
</span><span class="cx">         # code, but should we really be looking at the XML content or the
</span><span class="cx">         # content-type header?  It seems to me like this ought to be considered
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodpostpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/post.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/post.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/post.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> 
</span><span class="cx">     # POST can only target an existing resource
</span><span class="cx">     if not self.exists():
</span><del>-        log.error(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+        log.error(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">         raise HTTPError(responsecode.NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">     # POST can support many different APIs
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodpropfindpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/propfind.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/propfind.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/propfind.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">         parent = (yield request.locateResource(parentURL))
</span><span class="cx">         yield parent.authorize(request, (davxml.Bind(),))
</span><span class="cx"> 
</span><del>-        log.error(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+        log.error(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">         raise HTTPError(responsecode.NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">     #
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     try:
</span><span class="cx">         doc = (yield davXMLFromStream(request.stream))
</span><span class="cx">     except ValueError, e:
</span><del>-        log.error(&quot;Error while handling PROPFIND body: %s&quot; % (e,))
</del><ins>+        log.error(&quot;Error while handling PROPFIND body: {ex}&quot;, ex=e)
</ins><span class="cx">         raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, str(e)))
</span><span class="cx"> 
</span><span class="cx">     if doc is None:
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx">                 try:
</span><span class="cx">                     resource_properties = (yield resource.listProperties(request))
</span><span class="cx">                 except:
</span><del>-                    log.error(&quot;Unable to get properties for resource %r&quot; % (resource,))
</del><ins>+                    log.error(&quot;Unable to get properties for resource {r!r}&quot;, r=resource)
</ins><span class="cx">                     raise
</span><span class="cx"> 
</span><span class="cx">                 properties_by_status = {
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodreportpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">     Respond to a REPORT request. (RFC 3253, section 3.6)
</span><span class="cx">     &quot;&quot;&quot;
</span><span class="cx">     if not self.exists():
</span><del>-        log.error(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+        log.error(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">         raise HTTPError(responsecode.NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">     #
</span><span class="lines">@@ -117,8 +117,10 @@
</span><span class="cx">         #
</span><span class="cx">         # Requested report is not supported.
</span><span class="cx">         #
</span><del>-        log.error(&quot;Unsupported REPORT {name} for resource {resource} (no method {method})&quot;,
-                  name=encodeXMLName(namespace, name), resource=self, method=method_name)
</del><ins>+        log.error(
+            &quot;Unsupported REPORT {name} for resource {resource} (no method {method})&quot;,
+            name=encodeXMLName(namespace, name), resource=self, method=method_name,
+        )
</ins><span class="cx"> 
</span><span class="cx">         raise HTTPError(ErrorResponse(
</span><span class="cx">             responsecode.FORBIDDEN,
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodreport_addressbook_querypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_addressbook_query.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_addressbook_query.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_addressbook_query.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> 
</span><span class="cx">     # Verify that the filter element is valid
</span><span class="cx">     if (filter is None) or not filter.valid():
</span><del>-        log.error(&quot;Invalid filter element: %r&quot; % (filter,))
</del><ins>+        log.error(&quot;Invalid filter element: {f!r}&quot;, f=filter)
</ins><span class="cx">         raise HTTPError(ErrorResponse(
</span><span class="cx">             responsecode.FORBIDDEN,
</span><span class="cx">             (carddav_namespace, &quot;valid-filter&quot;),
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodreport_calendar_querypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_calendar_query.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_calendar_query.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_calendar_query.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">     if not self.isCollection():
</span><span class="cx">         parent = (yield self.locateParent(request, request.uri))
</span><span class="cx">         if not parent.isPseudoCalendarCollection():
</span><del>-            log.error(&quot;calendar-query report is not allowed on a resource outside of a calendar collection %s&quot; % (self,))
</del><ins>+            log.error(&quot;calendar-query report is not allowed on a resource outside of a calendar collection {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(StatusResponse(responsecode.FORBIDDEN, &quot;Must be calendar collection or calendar resource&quot;))
</span><span class="cx"> 
</span><span class="cx">     responses = []
</span><span class="lines">@@ -125,7 +125,7 @@
</span><span class="cx"> 
</span><span class="cx">     # Verify that the filter element is valid
</span><span class="cx">     if (filter is None) or not filter.valid():
</span><del>-        log.error(&quot;Invalid filter element: %r&quot; % (xmlfilter,))
</del><ins>+        log.error(&quot;Invalid filter element: {f!r}&quot;, f=xmlfilter)
</ins><span class="cx">         raise HTTPError(ErrorResponse(
</span><span class="cx">             responsecode.FORBIDDEN,
</span><span class="cx">             (caldav_namespace, &quot;valid-filter&quot;),
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">                     # of one of these resources in another request.  In this
</span><span class="cx">                     # case, we ignore the now missing resource rather
</span><span class="cx">                     # than raise an error for the entire report.
</span><del>-                    log.error(&quot;Missing resource during query: %s&quot; % (href,))
</del><ins>+                    log.error(&quot;Missing resource during query: {h}&quot;, h=href)
</ins><span class="cx"> 
</span><span class="cx">         # Check whether supplied resource is a calendar or a calendar object resource
</span><span class="cx">         if calresource.isPseudoCalendarCollection():
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodreport_freebusypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_freebusy.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_freebusy.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_freebusy.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     (CalDAV-access-09, section 7.8)
</span><span class="cx">     &quot;&quot;&quot;
</span><span class="cx">     if not self.isCollection():
</span><del>-        log.error(&quot;freebusy report is only allowed on collection resources %s&quot; % (self,))
</del><ins>+        log.error(&quot;freebusy report is only allowed on collection resources {s!r}&quot;, s=self)
</ins><span class="cx">         raise HTTPError(StatusResponse(responsecode.FORBIDDEN, &quot;Not a calendar collection&quot;))
</span><span class="cx"> 
</span><span class="cx">     if freebusy.qname() != (caldavxml.caldav_namespace, &quot;free-busy-query&quot;):
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavmethodreport_sync_collectionpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_sync_collection.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_sync_collection.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/method/report_sync_collection.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> 
</span><span class="cx">     # These resource support the report
</span><span class="cx">     if not config.EnableSyncReport or element.Report(element.SyncCollection(),) not in self.supportedReports():
</span><del>-        log.error(&quot;sync-collection report is only allowed on calendar/inbox/addressbook/notification collection resources %s&quot; % (self,))
</del><ins>+        log.error(&quot;sync-collection report is only allowed on calendar/inbox/addressbook/notification collection resources {s!r}&quot;, s=self)
</ins><span class="cx">         raise HTTPError(ErrorResponse(
</span><span class="cx">             responsecode.FORBIDDEN,
</span><span class="cx">             element.SupportedReport(),
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">         descriptor = &quot;Depth header without DAV:sync-level&quot;
</span><span class="cx"> 
</span><span class="cx">     if depth not in (&quot;1&quot;, &quot;infinity&quot;):
</span><del>-        log.error(&quot;sync-collection report with invalid depth header: %s&quot; % (depth,))
</del><ins>+        log.error(&quot;sync-collection report with invalid depth header: {d}&quot;, d=depth)
</ins><span class="cx">         raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, &quot;Invalid %s value&quot; % (descriptor,)))
</span><span class="cx"> 
</span><span class="cx">     propertyreq = sync_collection.property.children if sync_collection.property else None
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx">             # of one of these resources in another request.  In this
</span><span class="cx">             # case, we ignore the now missing resource rather
</span><span class="cx">             # than raise an error for the entire report.
</span><del>-            log.error(&quot;Missing resource during sync: %s&quot; % (href,))
</del><ins>+            log.error(&quot;Missing resource during sync: {h}&quot;, h=href)
</ins><span class="cx"> 
</span><span class="cx">     for child, child_uri in forbidden_resources:
</span><span class="cx">         href = element.HRef.fromString(child_uri)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">             # of one of these resources in another request.  In this
</span><span class="cx">             # case, we ignore the now missing resource rather
</span><span class="cx">             # than raise an error for the entire report.
</span><del>-            log.error(&quot;Missing resource during sync: %s&quot; % (href,))
</del><ins>+            log.error(&quot;Missing resource during sync: {h}&quot;, h=href)
</ins><span class="cx"> 
</span><span class="cx">     for name in removed:
</span><span class="cx">         href = element.HRef.fromString(joinURL(request.uri, name))
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavresourcepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/resource.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/resource.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/resource.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -1395,12 +1395,12 @@
</span><span class="cx">             created in this resource.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         if self.exists():
</span><del>-            self.log.error(&quot;Attempt to create collection where file exists: %s&quot; % (self,))
</del><ins>+            self.log.error(&quot;Attempt to create collection where file exists: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(StatusResponse(responsecode.NOT_ALLOWED, &quot;File exists&quot;))
</span><span class="cx"> 
</span><span class="cx">         # newStore guarantees that we always have a parent calendar home
</span><span class="cx">         # if not self.fp.parent().isdir():
</span><del>-        #     log.error(&quot;Attempt to create collection with no parent: %s&quot; % (self.fp.path,))
</del><ins>+        #     log.error(&quot;Attempt to create collection with no parent: {p}&quot;, p=self.fp.path)
</ins><span class="cx">         #     raise HTTPError(StatusResponse(responsecode.CONFLICT, &quot;No parent collection&quot;))
</span><span class="cx"> 
</span><span class="cx">         #
</span><span class="lines">@@ -1410,7 +1410,7 @@
</span><span class="cx">         parent = (yield self._checkParents(request, isPseudoCalendarCollectionResource))
</span><span class="cx"> 
</span><span class="cx">         if parent is not None:
</span><del>-            self.log.error(&quot;Cannot create a calendar collection within a calendar collection %s&quot; % (parent,))
</del><ins>+            self.log.error(&quot;Cannot create a calendar collection within a calendar collection {p!r}&quot;, p=parent)
</ins><span class="cx">             raise HTTPError(ErrorResponse(
</span><span class="cx">                 responsecode.FORBIDDEN,
</span><span class="cx">                 (caldavxml.caldav_namespace, &quot;calendar-collection-location-ok&quot;),
</span><span class="lines">@@ -1421,7 +1421,7 @@
</span><span class="cx">         if config.MaxCollectionsPerHome:
</span><span class="cx">             parent = (yield self.locateParent(request, request.urlForResource(self)))
</span><span class="cx">             if (yield parent.countOwnedChildren()) &gt;= config.MaxCollectionsPerHome: # NB this ignores shares
</span><del>-                self.log.error(&quot;Cannot create a calendar collection because there are too many already present in %s&quot; % (parent,))
</del><ins>+                self.log.error(&quot;Cannot create a calendar collection because there are too many already present in {p!r}&quot;, p=parent)
</ins><span class="cx">                 raise HTTPError(ErrorResponse(
</span><span class="cx">                     responsecode.FORBIDDEN,
</span><span class="cx">                     customxml.MaxCollections(),
</span><span class="lines">@@ -1484,12 +1484,12 @@
</span><span class="cx">         #
</span><span class="cx"> 
</span><span class="cx">         if self.exists():
</span><del>-            self.log.error(&quot;Attempt to create collection where file exists: %s&quot; % (self,))
</del><ins>+            self.log.error(&quot;Attempt to create collection where file exists: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(StatusResponse(responsecode.NOT_ALLOWED, &quot;File exists&quot;))
</span><span class="cx"> 
</span><span class="cx">         # newStore guarantees that we always have a parent calendar home
</span><span class="cx">         # if not os.path.isdir(os.path.dirname(self.fp.path)):
</span><del>-        #     log.error(&quot;Attempt to create collection with no parent: %s&quot; % (self.fp.path,))
</del><ins>+        #     log.error(&quot;Attempt to create collection with no parent: {p}&quot;, p=self.fp.path)
</ins><span class="cx">         #     raise HTTPError(StatusResponse(responsecode.CONFLICT, &quot;No parent collection&quot;))
</span><span class="cx"> 
</span><span class="cx">         #
</span><span class="lines">@@ -1498,7 +1498,7 @@
</span><span class="cx"> 
</span><span class="cx">         parent = (yield self._checkParents(request, isAddressBookCollectionResource))
</span><span class="cx">         if parent is not None:
</span><del>-            self.log.error(&quot;Cannot create an address book collection within an address book collection %s&quot; % (parent,))
</del><ins>+            self.log.error(&quot;Cannot create an address book collection within an address book collection {p!r}&quot;, p=parent)
</ins><span class="cx">             raise HTTPError(ErrorResponse(
</span><span class="cx">                 responsecode.FORBIDDEN,
</span><span class="cx">                 (carddavxml.carddav_namespace, &quot;addressbook-collection-location-ok&quot;),
</span><span class="lines">@@ -1509,7 +1509,7 @@
</span><span class="cx">         if config.MaxCollectionsPerHome:
</span><span class="cx">             parent = (yield self.locateParent(request, request.urlForResource(self)))
</span><span class="cx">             if (yield parent.countOwnedChildren()) &gt;= config.MaxCollectionsPerHome: # NB this ignores shares
</span><del>-                self.log.error(&quot;Cannot create a calendar collection because there are too many already present in %s&quot; % (parent,))
</del><ins>+                self.log.error(&quot;Cannot create a calendar collection because there are too many already present in {p!r}&quot;, p=parent)
</ins><span class="cx">                 raise HTTPError(ErrorResponse(
</span><span class="cx">                     responsecode.FORBIDDEN,
</span><span class="cx">                     customxml.MaxCollections(),
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavscheduling_storecaldavresourcepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/scheduling_store/caldav/resource.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/scheduling_store/caldav/resource.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/scheduling_store/caldav/resource.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -453,7 +453,7 @@
</span><span class="cx">         contentType = request.headers.getHeader(&quot;content-type&quot;)
</span><span class="cx">         format = self.determineType(contentType)
</span><span class="cx">         if format is None:
</span><del>-            self.log.error(&quot;MIME type %s not allowed in calendar collection&quot; % (contentType,))
</del><ins>+            self.log.error(&quot;MIME type {t} not allowed in calendar collection&quot;, t=contentType)
</ins><span class="cx">             raise HTTPError(ErrorResponse(
</span><span class="cx">                 responsecode.FORBIDDEN,
</span><span class="cx">                 (caldav_namespace, &quot;supported-calendar-data&quot;),
</span><span class="lines">@@ -465,7 +465,7 @@
</span><span class="cx">             calendar = (yield Component.fromIStream(request.stream, format=format))
</span><span class="cx">         except:
</span><span class="cx">             # FIXME: Bare except
</span><del>-            self.log.error(&quot;Error while handling POST: %s&quot; % (Failure(),))
</del><ins>+            self.log.error(&quot;Error while handling POST: {f}&quot;, f=Failure())
</ins><span class="cx">             raise HTTPError(ErrorResponse(
</span><span class="cx">                 responsecode.FORBIDDEN,
</span><span class="cx">                 (caldav_namespace, &quot;valid-calendar-data&quot;),
</span><span class="lines">@@ -486,7 +486,7 @@
</span><span class="cx">             originator = originatorPrincipal.canonicalCalendarUserAddress()
</span><span class="cx"> 
</span><span class="cx">         if not originator:
</span><del>-            self.log.error(&quot;%s request must have Originator&quot; % (self.method,))
</del><ins>+            self.log.error(&quot;{m} request must have Originator&quot;, m=self.method)
</ins><span class="cx">             raise HTTPError(ErrorResponse(
</span><span class="cx">                 responsecode.FORBIDDEN,
</span><span class="cx">                 (caldav_namespace, &quot;originator-specified&quot;),
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavsharingpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/sharing.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/sharing.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/sharing.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -775,7 +775,7 @@
</span><span class="cx">         try:
</span><span class="cx">             doc = element.WebDAVDocument.fromString(xmldata)
</span><span class="cx">         except ValueError, e:
</span><del>-            self.log.error(&quot;Error parsing doc (%s) Doc:\n %s&quot; % (str(e), xmldata,))
</del><ins>+            self.log.error(&quot;Error parsing doc ({ex}) Doc:\n {x}&quot;, ex=str(e), x=xmldata)
</ins><span class="cx">             raise HTTPError(ErrorResponse(
</span><span class="cx">                 responsecode.FORBIDDEN,
</span><span class="cx">                 (customxml.calendarserver_namespace, &quot;valid-request&quot;),
</span><span class="lines">@@ -787,7 +787,7 @@
</span><span class="cx">             result = (yield self.xmlDocHandlers[type(root)](self, request, root))
</span><span class="cx">             returnValue(result)
</span><span class="cx">         else:
</span><del>-            self.log.error(&quot;Unsupported XML (%s)&quot; % (root,))
</del><ins>+            self.log.error(&quot;Unsupported XML ({r})&quot;, r=root)
</ins><span class="cx">             raise HTTPError(ErrorResponse(
</span><span class="cx">                 responsecode.FORBIDDEN,
</span><span class="cx">                 (customxml.calendarserver_namespace, &quot;valid-request&quot;),
</span><span class="lines">@@ -813,7 +813,7 @@
</span><span class="cx">                 if contentType in self._postHandlers:
</span><span class="cx">                     return self._postHandlers[contentType](self, request)
</span><span class="cx">                 else:
</span><del>-                    self.log.info(&quot;Got a POST on collection or group with an unsupported content type: %s&quot; % (contentType,))
</del><ins>+                    self.log.info(&quot;Got a POST on collection or group with an unsupported content type: {t}&quot;, t=contentType)
</ins><span class="cx">             else:
</span><span class="cx">                 self.log.info(&quot;Got a POST on collection or group with no content type&quot;)
</span><span class="cx">         return succeed(responsecode.FORBIDDEN)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavsqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/sql.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/sql.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/sql.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -124,16 +124,20 @@
</span><span class="cx">                         del(self._db_connection)
</span><span class="cx"> 
</span><span class="cx">                         if dbtype != self._db_type():
</span><del>-                            log.error(&quot;Database %s has different type (%s vs. %s)&quot;
-                                      % (db_filename, dbtype, self._db_type()))
</del><ins>+                            log.error(
+                                &quot;Database {f} has different type ({t1} vs. {t2})&quot;,
+                                f=db_filename, t1=dbtype, t2=self._db_type(),
+                            )
</ins><span class="cx"> 
</span><span class="cx">                             # Delete this index and start over
</span><span class="cx">                             os.remove(db_filename)
</span><span class="cx">                             return self._db()
</span><span class="cx"> 
</span><span class="cx">                         if version != self._db_version():
</span><del>-                            log.error(&quot;Database %s has different schema (v.%s vs. v.%s)&quot;
-                                      % (db_filename, version, self._db_version()))
</del><ins>+                            log.error(
+                                &quot;Database {f} has different schema (v.{v1} vs. v.{v2})&quot;,
+                                f=db_filename, v1=version, v2=self._db_version(),
+                            )
</ins><span class="cx"> 
</span><span class="cx">                             # Upgrade the DB
</span><span class="cx">                             return self._db_upgrade(version)
</span><span class="lines">@@ -186,7 +190,7 @@
</span><span class="cx">         @param db_filename: the file name of the index database.
</span><span class="cx">         @param q:           a database cursor to use.
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        log.info(&quot;Initializing database %s&quot; % (db_filename,))
</del><ins>+        log.info(&quot;Initializing database {f}&quot;, f=db_filename)
</ins><span class="cx"> 
</span><span class="cx">         # We need an exclusive lock here as we are making a big change to the database and we don't
</span><span class="cx">         # want other processes to get stomped on or stomp on us.
</span><span class="lines">@@ -363,7 +367,7 @@
</span><span class="cx">             self.lastrowid = q.lastrowid
</span><span class="cx">             return q.fetchall()
</span><span class="cx">         except DatabaseError:
</span><del>-            log.error(&quot;Exception while executing SQL on DB %s: %r %r&quot; % (self, sql, query_params))
</del><ins>+            log.error(&quot;Exception while executing SQL on DB {s!r}: {q!r} {p!r}&quot;, s=self, q=sql, p=query_params)
</ins><span class="cx">             raise
</span><span class="cx">         finally:
</span><span class="cx">             q.close()
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavstdconfigpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/stdconfig.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/stdconfig.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/stdconfig.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -28,8 +28,9 @@
</span><span class="cx"> from twext.enterprise.jobs.jobitem import JobItem
</span><span class="cx"> from twext.enterprise.jobs.queue import ControllerQueue
</span><span class="cx"> from twext.enterprise.jobs.workitem import WorkItem
</span><del>-from twext.python.log import Logger, InvalidLogLevelError, LogLevel
</del><ins>+from twext.python.log import Logger
</ins><span class="cx"> 
</span><ins>+from twisted.logger import InvalidLogLevelError, LogLevel
</ins><span class="cx"> from twisted.python.filepath import FilePath
</span><span class="cx"> from twisted.python.runtime import platform
</span><span class="cx"> 
</span><span class="lines">@@ -1213,7 +1214,7 @@
</span><span class="cx">             with open(filename) as f:
</span><span class="cx">                 configDict = parser.parse(f)
</span><span class="cx">         except (IOError, OSError):
</span><del>-            log.error(&quot;Configuration file does not exist or is inaccessible: %s&quot; % (filename,))
</del><ins>+            log.error(&quot;Configuration file does not exist or is inaccessible: {f}&quot;, f=filename)
</ins><span class="cx">             raise ConfigurationError(&quot;Configuration file does not exist or is inaccessible: %s&quot; % (filename,))
</span><span class="cx">         else:
</span><span class="cx">             configDict = _cleanup(configDict, self._defaults)
</span><span class="lines">@@ -1416,7 +1417,7 @@
</span><span class="cx"> 
</span><span class="cx">     for param in items.get(&quot;DirectoryService&quot;, {}).get(&quot;params&quot;, {}):
</span><span class="cx">         if dsType in DEFAULT_SERVICE_PARAMS and param not in DEFAULT_SERVICE_PARAMS[dsType]:
</span><del>-            log.warn(&quot;Parameter %s is not supported by service %s&quot; % (param, dsType))
</del><ins>+            log.warn(&quot;Parameter {p} is not supported by service {t}&quot;, p=param, t=dsType)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -1446,7 +1447,7 @@
</span><span class="cx"> 
</span><span class="cx">     for param in items.get(&quot;ResourceService&quot;, {}).get(&quot;params&quot;, {}):
</span><span class="cx">         if dsType in DEFAULT_RESOURCE_PARAMS and param not in DEFAULT_RESOURCE_PARAMS[dsType]:
</span><del>-            log.warn(&quot;Parameter %s is not supported by service %s&quot; % (param, dsType))
</del><ins>+            log.warn(&quot;Parameter {p} is not supported by service {t}&quot;, p=param, t=dsType)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -1502,7 +1503,7 @@
</span><span class="cx">     if configDict.AugmentService.type in DEFAULT_AUGMENT_PARAMS:
</span><span class="cx">         for param in tuple(configDict.AugmentService.params):
</span><span class="cx">             if param not in DEFAULT_AUGMENT_PARAMS[configDict.AugmentService.type]:
</span><del>-                log.warn(&quot;Parameter %s is not supported by service %s&quot; % (param, configDict.AugmentService.type))
</del><ins>+                log.warn(&quot;Parameter {p} is not supported by service {t}&quot;, p=param, t=configDict.AugmentService.type)
</ins><span class="cx">                 del configDict.AugmentService.params[param]
</span><span class="cx"> 
</span><span class="cx">     # Upgrading augments.xml must be done prior to using the store/directory
</span><span class="lines">@@ -1567,7 +1568,7 @@
</span><span class="cx">         * configDict.AdminACEs
</span><span class="cx">     )
</span><span class="cx"> 
</span><del>-    log.debug(&quot;Root ACL: %s&quot; % (configDict.RootResourceACL.toxml(),))
</del><ins>+    log.debug(&quot;Root ACL: {x}&quot;, x=configDict.RootResourceACL.toxml())
</ins><span class="cx"> 
</span><span class="cx">     configDict.ProvisioningResourceACL = davxml.ACL(
</span><span class="cx">         # Read-only for anon or authenticated, depending on config
</span><span class="lines">@@ -1588,7 +1589,7 @@
</span><span class="cx">         ]
</span><span class="cx">     )
</span><span class="cx"> 
</span><del>-    log.debug(&quot;Nav ACL: %s&quot; % (configDict.ProvisioningResourceACL.toxml(),))
</del><ins>+    log.debug(&quot;Nav ACL: {x}&quot;, x=configDict.ProvisioningResourceACL.toxml())
</ins><span class="cx"> 
</span><span class="cx">     def principalObjects(urls):
</span><span class="cx">         for principalURL in urls:
</span><span class="lines">@@ -1628,19 +1629,19 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> def _updateLogLevels(configDict, reloading=False):
</span><del>-    log.publisher.levels.clearLogLevels()
</del><ins>+    log.levels().clearLogLevels()
</ins><span class="cx"> 
</span><span class="cx">     try:
</span><span class="cx">         if &quot;DefaultLogLevel&quot; in configDict:
</span><span class="cx">             levelName = configDict[&quot;DefaultLogLevel&quot;]
</span><span class="cx">             if levelName:
</span><del>-                log.publisher.levels.setLogLevelForNamespace(
</del><ins>+                log.levels().setLogLevelForNamespace(
</ins><span class="cx">                     None, LogLevel.levelWithName(levelName)
</span><span class="cx">                 )
</span><span class="cx"> 
</span><span class="cx">         if &quot;LogLevels&quot; in configDict:
</span><span class="cx">             for namespace, levelName in configDict[&quot;LogLevels&quot;].iteritems():
</span><del>-                log.publisher.levels.setLogLevelForNamespace(
</del><ins>+                log.levels().setLogLevelForNamespace(
</ins><span class="cx">                     namespace, LogLevel.levelWithName(levelName)
</span><span class="cx">                 )
</span><span class="cx"> 
</span><span class="lines">@@ -1682,7 +1683,7 @@
</span><span class="cx">                             topic = getAPNTopicFromCertificate(certPath)
</span><span class="cx">                             service[protocol][&quot;Topic&quot;] = topic
</span><span class="cx">                         else:
</span><del>-                            log.error(&quot;APNS certificate not found: %s&quot; % (certPath,))
</del><ins>+                            log.error(&quot;APNS certificate not found: {p}&quot;, p=certPath)
</ins><span class="cx">                     else:
</span><span class="cx">                         log.error(&quot;APNS certificate path not specified&quot;)
</span><span class="cx"> 
</span><span class="lines">@@ -1695,13 +1696,13 @@
</span><span class="cx">                 try:
</span><span class="cx">                     passphrase = getPasswordFromKeychain(accountName)
</span><span class="cx">                     service[protocol][&quot;Passphrase&quot;] = passphrase
</span><del>-                    log.info(&quot;%s APNS certificate passphrase retreived from keychain&quot; % (protocol,))
</del><ins>+                    log.info(&quot;{p} APNS certificate passphrase retreived from keychain&quot;, p=protocol)
</ins><span class="cx">                 except KeychainAccessError:
</span><span class="cx">                     # The system doesn't support keychain
</span><span class="cx">                     pass
</span><span class="cx">                 except KeychainPasswordNotFound:
</span><span class="cx">                     # The password doesn't exist in the keychain.
</span><del>-                    log.info(&quot;%s APNS certificate passphrase not found in keychain&quot; % (protocol,))
</del><ins>+                    log.info(&quot;{p} APNS certificate passphrase not found in keychain&quot;, p=protocol)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -1738,13 +1739,13 @@
</span><span class="cx">                     if not service[direction][&quot;Password&quot;]:
</span><span class="cx">                         password = getPasswordFromKeychain(account)
</span><span class="cx">                         service[direction][&quot;Password&quot;] = password
</span><del>-                        log.info(&quot;iMIP %s password successfully retrieved from keychain&quot; % (direction,))
</del><ins>+                        log.info(&quot;iMIP {d} password successfully retrieved from keychain&quot;, d=direction)
</ins><span class="cx">                 except KeychainAccessError:
</span><span class="cx">                     # The system doesn't support keychain
</span><span class="cx">                     pass
</span><span class="cx">                 except KeychainPasswordNotFound:
</span><span class="cx">                     # The password doesn't exist in the keychain.
</span><del>-                    log.info(&quot;iMIP %s password not found in keychain&quot; % (direction,))
</del><ins>+                    log.info(&quot;iMIP {d} password not found in keychain&quot;, d=direction)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -1801,12 +1802,12 @@
</span><span class="cx">         if config_key in os.environ and os.environ[config_key] == config_key_value:
</span><span class="cx">             pass
</span><span class="cx">         else:
</span><del>-            log.error(&quot;Ignoring unknown configuration option: %r&quot; % (key,))
</del><ins>+            log.error(&quot;Ignoring unknown configuration option: {k}&quot;, k=key)
</ins><span class="cx">             del cleanDict[key]
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def deprecated(oldKey, newKey):
</span><del>-        log.error(&quot;Configuration option %r is deprecated in favor of %r.&quot; % (oldKey, newKey))
</del><ins>+        log.error(&quot;Configuration option {o} is deprecated in favor of {n}.&quot;, o=oldKey, n=newKey)
</ins><span class="cx">         if oldKey in configDict and newKey in configDict:
</span><span class="cx">             raise ConfigurationError(
</span><span class="cx">                 &quot;Both %r and %r options are specified; use the %r option only.&quot;
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavstorebridgepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/storebridge.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/storebridge.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/storebridge.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -436,7 +436,7 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         depth = request.headers.getHeader(&quot;depth&quot;, &quot;infinity&quot;)
</span><span class="lines">@@ -473,13 +473,13 @@
</span><span class="cx"> 
</span><span class="cx">         # Check sharee collection first
</span><span class="cx">         if self.isShareeResource():
</span><del>-            log.debug(&quot;Removing shared collection %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Removing shared collection {s!r}&quot;, s=self)
</ins><span class="cx">             yield self.removeShareeResource(request)
</span><span class="cx">             # Re-initialize to get stuff setup again now we have no object
</span><span class="cx">             self._initializeWithHomeChild(None, self._parentResource)
</span><span class="cx">             returnValue(NO_CONTENT)
</span><span class="cx"> 
</span><del>-        log.debug(&quot;Deleting collection %s&quot; % (self,))
</del><ins>+        log.debug(&quot;Deleting collection {s!r}&quot;, s=self)
</ins><span class="cx"> 
</span><span class="cx">         # 'deluri' is this resource's URI; I should be able to synthesize it
</span><span class="cx">         # from 'self'.
</span><span class="lines">@@ -536,7 +536,7 @@
</span><span class="cx">         that collections's name.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         # Can not move outside of home or to existing collection
</span><span class="lines">@@ -2094,7 +2094,7 @@
</span><span class="cx">             raise HTTPError(FORBIDDEN)
</span><span class="cx"> 
</span><span class="cx">         except Exception, e:
</span><del>-            log.error(&quot;Unable to store attachment: %s&quot; % (e,))
</del><ins>+            log.error(&quot;Unable to store attachment: {ex}&quot;, ex=e)
</ins><span class="cx">             raise HTTPError(SERVICE_UNAVAILABLE)
</span><span class="cx"> 
</span><span class="cx">         try:
</span><span class="lines">@@ -2116,7 +2116,7 @@
</span><span class="cx">     def http_GET(self, request):
</span><span class="cx"> 
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         stream = ProducerStream()
</span><span class="lines">@@ -2130,7 +2130,7 @@
</span><span class="cx">         try:
</span><span class="cx">             self._newStoreAttachment.retrieve(StreamProtocol())
</span><span class="cx">         except IOError, e:
</span><del>-            log.error(&quot;Unable to read attachment: %s, due to: %s&quot; % (self, e,))
</del><ins>+            log.error(&quot;Unable to read attachment: {s!r}, due to: {ex}&quot;, s=self, ex=e)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         headers = {&quot;content-type&quot;: self.contentType()}
</span><span class="lines">@@ -2146,7 +2146,7 @@
</span><span class="cx">             raise HTTPError(FORBIDDEN)
</span><span class="cx"> 
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         yield self._newStoreCalendarObject.removeAttachmentWithName(
</span><span class="lines">@@ -2265,7 +2265,7 @@
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def render(self, request):
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         # Accept header handling
</span><span class="lines">@@ -2368,7 +2368,7 @@
</span><span class="cx">         Override http_DELETE to validate 'depth' header.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         return self.storeRemove(request)
</span><span class="lines">@@ -2391,7 +2391,7 @@
</span><span class="cx">         # Do some pre-flight checks - must exist, must be move to another
</span><span class="cx">         # CommonHomeChild in the same Home, destination resource must not exist
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         parent = (yield request.locateResource(parentForURL(request.uri)))
</span><span class="lines">@@ -2666,8 +2666,9 @@
</span><span class="cx">             # Do &quot;precondition&quot; test
</span><span class="cx">             if (self.scheduleTag != header):
</span><span class="cx">                 log.debug(
</span><del>-                    &quot;If-Schedule-Tag-Match: header value '%s' does not match resource value '%s'&quot; %
-                    (header, self.scheduleTag,))
</del><ins>+                    &quot;If-Schedule-Tag-Match: header value '{h}' does not match resource value '{r}'&quot;,
+                    h=header, r=self.scheduleTag
+                )
</ins><span class="cx">                 raise HTTPError(PRECONDITION_FAILED)
</span><span class="cx">             return True
</span><span class="cx"> 
</span><span class="lines">@@ -2907,7 +2908,7 @@
</span><span class="cx">         except Exception as err:
</span><span class="cx"> 
</span><span class="cx">             if isinstance(err, ValueError):
</span><del>-                log.error(&quot;Error while handling (calendar) PUT: %s&quot; % (err,))
</del><ins>+                log.error(&quot;Error while handling (calendar) PUT: {ex}&quot;, ex=err)
</ins><span class="cx">                 raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, str(err)))
</span><span class="cx">             else:
</span><span class="cx">                 raise
</span><span class="lines">@@ -2919,7 +2920,7 @@
</span><span class="cx">         Override http_DELETE to do schedule tag behavior.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         # Do schedule tag check
</span><span class="lines">@@ -2937,7 +2938,7 @@
</span><span class="cx">         # Do some pre-flight checks - must exist, must be move to another
</span><span class="cx">         # CommonHomeChild in the same Home, destination resource must not exist
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         # Do schedule tag check
</span><span class="lines">@@ -3556,7 +3557,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Handle sharing
</span><span class="cx">         if self.isShareeResource():
</span><del>-            log.debug(&quot;Removing shared resource %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Removing shared resource {s!r}&quot;, s=self)
</ins><span class="cx">             yield self.removeShareeResource(request)
</span><span class="cx">             # Re-initialize to get stuff setup again now we have no object
</span><span class="cx">             self._initializeWithObject(None, self._newStoreParent)
</span><span class="lines">@@ -3672,7 +3673,7 @@
</span><span class="cx">         except Exception as err:
</span><span class="cx"> 
</span><span class="cx">             if isinstance(err, ValueError):
</span><del>-                log.error(&quot;Error while handling (vCard) PUT: %s&quot; % (err,))
</del><ins>+                log.error(&quot;Error while handling (vCard) PUT: {ex}&quot;, ex=err)
</ins><span class="cx">                 raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, str(err)))
</span><span class="cx">             else:
</span><span class="cx">                 raise
</span><span class="lines">@@ -3717,7 +3718,7 @@
</span><span class="cx">         @rtype: L{davxml.ACL}
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         if not self._parentResource.isShareeResource():
</span><span class="lines">@@ -4044,7 +4045,7 @@
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def http_GET(self, request):
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         returnValue(
</span><span class="lines">@@ -4059,7 +4060,7 @@
</span><span class="cx">         Override http_DELETE to validate 'depth' header.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         if not self.exists():
</span><del>-            log.debug(&quot;Resource not found: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Resource not found: {s!r}&quot;, s=self)
</ins><span class="cx">             raise HTTPError(NOT_FOUND)
</span><span class="cx"> 
</span><span class="cx">         return self.storeRemove(request)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavtesttest_configpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/test/test_config.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/test/test_config.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/test/test_config.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -17,17 +17,19 @@
</span><span class="cx"> import socket
</span><span class="cx"> 
</span><span class="cx"> from plistlib import writePlist #@UnresolvedImport
</span><del>-from twext.python.log import LogLevel
-from twext.python.test.test_log import defaultLogLevel, logLevelForNamespace
</del><span class="cx"> 
</span><ins>+from twext.python.log import Logger
+
</ins><span class="cx"> from twistedcaldav.config import config, ConfigDict, mergeData
</span><span class="cx"> from twistedcaldav.resource import CalDAVResource
</span><span class="cx"> from twistedcaldav.stdconfig import DEFAULT_CONFIG, PListConfigProvider, \
</span><span class="cx">     RELATIVE_PATHS
</span><span class="cx"> from twistedcaldav.test.util import TestCase
</span><span class="cx"> 
</span><ins>+from twisted.logger import LogLevel
</ins><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> testConfig = &quot;&quot;&quot;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
</span><span class="cx"> &lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
</span><span class="cx"> &lt;plist version=&quot;1.0&quot;&gt;
</span><span class="lines">@@ -404,6 +406,7 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Logging module configures properly.
</span><span class="cx">         &quot;&quot;&quot;
</span><ins>+        defaultLogLevel = Logger.filterPredicate.logLevelForNamespace(None)
</ins><span class="cx">         self.assertNotEqual(
</span><span class="cx">             defaultLogLevel, LogLevel.error,
</span><span class="cx">             &quot;This test assumes the default log level is not error.&quot;
</span><span class="lines">@@ -412,19 +415,19 @@
</span><span class="cx">         config.setDefaults(DEFAULT_CONFIG)
</span><span class="cx">         config.reload()
</span><span class="cx"> 
</span><del>-        self.assertEquals(logLevelForNamespace(None), defaultLogLevel)
-        self.assertEquals(logLevelForNamespace(&quot;some.namespace&quot;), defaultLogLevel)
</del><ins>+        self.assertEquals(Logger.filterPredicate.logLevelForNamespace(None), defaultLogLevel)
+        self.assertEquals(Logger.filterPredicate.logLevelForNamespace(&quot;some.namespace&quot;), defaultLogLevel)
</ins><span class="cx"> 
</span><span class="cx">         config.load(self.testConfig)
</span><span class="cx"> 
</span><del>-        self.assertEquals(logLevelForNamespace(None), LogLevel.error)
-        self.assertEquals(logLevelForNamespace(&quot;some.namespace&quot;), LogLevel.debug)
</del><ins>+        self.assertEquals(Logger.filterPredicate.logLevelForNamespace(None), LogLevel.error)
+        self.assertEquals(Logger.filterPredicate.logLevelForNamespace(&quot;some.namespace&quot;), LogLevel.debug)
</ins><span class="cx"> 
</span><span class="cx">         writePlist({}, self.testConfig)
</span><span class="cx">         config.reload()
</span><span class="cx"> 
</span><del>-        self.assertEquals(logLevelForNamespace(None), defaultLogLevel)
-        self.assertEquals(logLevelForNamespace(&quot;some.namespace&quot;), defaultLogLevel)
</del><ins>+        self.assertEquals(Logger.filterPredicate.logLevelForNamespace(None), defaultLogLevel)
+        self.assertEquals(Logger.filterPredicate.logLevelForNamespace(&quot;some.namespace&quot;), defaultLogLevel)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_ConfigDict(self):
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavtestutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/test/util.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/test/util.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/test/util.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -572,7 +572,7 @@
</span><span class="cx">         # Attempt to exit promptly if a traceback is displayed, so we don't
</span><span class="cx">         # deal with timeouts.
</span><span class="cx">         if &quot;Traceback&quot; in data and not self.terminated:
</span><del>-            log.error(&quot;Terminating process due to output: %s&quot; % (data,))
</del><ins>+            log.error(&quot;Terminating process due to output: {d}&quot;, d=data)
</ins><span class="cx">             self.terminated = True
</span><span class="cx">             self.transport.signalProcess(&quot;TERM&quot;)
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavtimezonespy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/timezones.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/timezones.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/timezones.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx">                 dbpath.remove()
</span><span class="cx">                 TimezoneCache.copyPackage(&quot;Updating&quot;)
</span><span class="cx">             else:
</span><del>-                log.info(&quot;Valid timezones at %s&quot; % (dbpath.path,))
</del><ins>+                log.info(&quot;Valid timezones at {p}&quot;, p=dbpath.path)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @staticmethod
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavtimezonestdservicepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/timezonestdservice.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/timezonestdservice.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/timezonestdservice.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -632,7 +632,7 @@
</span><span class="cx">                 try:
</span><span class="cx">                     vtz = readVTZ(self.aliases[tzid])
</span><span class="cx">                 except TimezoneException:
</span><del>-                    log.error(&quot;Failed to find timezone data for alias: %s&quot; % (tzid,))
</del><ins>+                    log.error(&quot;Failed to find timezone data for alias: {tzid}&quot;, tzid=tzid)
</ins><span class="cx">                     return None
</span><span class="cx">                 else:
</span><span class="cx">                     vtz = vtz.duplicate()
</span><span class="lines">@@ -640,7 +640,7 @@
</span><span class="cx">                     addVTZ(tzid, vtz)
</span><span class="cx">                     calendar.addComponent(vtz.getComponents()[0].duplicate())
</span><span class="cx">             else:
</span><del>-                log.error(&quot;Failed to find timezone data for: %s&quot; % (tzid,))
</del><ins>+                log.error(&quot;Failed to find timezone data for: {tzid}&quot;, tzid=tzid)
</ins><span class="cx">                 return None
</span><span class="cx"> 
</span><span class="cx">         return calendar
</span><span class="lines">@@ -700,7 +700,7 @@
</span><span class="cx">                         tzdata = f.read()
</span><span class="cx">                     md5 = hashlib.md5(tzdata).hexdigest()
</span><span class="cx">                 except IOError:
</span><del>-                    log.error(&quot;Unable to read timezone file: %s&quot; % (fullPath,))
</del><ins>+                    log.error(&quot;Unable to read timezone file: {p}&quot;, p=fullPath)
</ins><span class="cx">                     continue
</span><span class="cx"> 
</span><span class="cx">                 if checkIfChanged:
</span><span class="lines">@@ -716,7 +716,7 @@
</span><span class="cx">             with open(os.path.join(self.basepath, &quot;links.txt&quot;)) as f:
</span><span class="cx">                 aliases = f.read()
</span><span class="cx">         except IOError, e:
</span><del>-            log.error(&quot;Unable to read links.txt file: %s&quot; % (str(e),))
</del><ins>+            log.error(&quot;Unable to read links.txt file: {ex}&quot;, ex=str(e))
</ins><span class="cx">             aliases = &quot;&quot;
</span><span class="cx"> 
</span><span class="cx">         try:
</span><span class="lines">@@ -729,9 +729,9 @@
</span><span class="cx">                             tzinfo.aliases += (alias_from,)
</span><span class="cx">                         self.aliases[alias_from] = alias_to
</span><span class="cx">                 else:
</span><del>-                    log.error(&quot;Missing alias from '%s' to '%s'&quot; % (alias_from, alias_to,))
</del><ins>+                    log.error(&quot;Missing alias from '{fr}' to '{to}'&quot;, fr=alias_from, to=alias_to)
</ins><span class="cx">         except ValueError:
</span><del>-            log.error(&quot;Unable to parse links.txt file: %s&quot; % (str(e),))
</del><ins>+            log.error(&quot;Unable to parse links.txt file: {ex}&quot;, ex=str(e))
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def updateDatabase(self):
</span><span class="lines">@@ -758,7 +758,7 @@
</span><span class="cx">         self.discovered = False
</span><span class="cx">         self._url = None
</span><span class="cx"> 
</span><del>-        log.debug(&quot;Configuring secondary server with basepath: %s&quot; % (self.basepath,))
</del><ins>+        log.debug(&quot;Configuring secondary server with basepath: {p}&quot;, p=self.basepath)
</ins><span class="cx"> 
</span><span class="cx">         if not os.path.exists(self.basepath):
</span><span class="cx">             os.makedirs(self.basepath)
</span><span class="lines">@@ -799,7 +799,7 @@
</span><span class="cx">             if self.timezones[tzid].dtstamp &lt; newtimezones[tzid].dtstamp:
</span><span class="cx">                 changedtzids.add(tzid)
</span><span class="cx"> 
</span><del>-        log.debug(&quot;Fetching %d new, %d changed timezones on secondary server&quot; % (len(newtzids), len(changedtzids),))
</del><ins>+        log.debug(&quot;Fetching {n} new, {c} changed timezones on secondary server&quot;, n=len(newtzids), c=len(changedtzids))
</ins><span class="cx"> 
</span><span class="cx">         # Now apply changes - do requests in parallel for speedier fetching
</span><span class="cx">         BATCH = 5
</span><span class="lines">@@ -833,17 +833,17 @@
</span><span class="cx">             self.uri = &quot;https://%s/.well-known/timezone&quot; % (self.uri,)
</span><span class="cx"> 
</span><span class="cx">         testURI = &quot;%s?action=capabilities&quot; % (self.uri,)
</span><del>-        log.debug(&quot;Discovering secondary server: %s&quot; % (testURI,))
</del><ins>+        log.debug(&quot;Discovering secondary server: {uri}&quot;, uri=testURI)
</ins><span class="cx">         response = (yield getURL(testURI))
</span><span class="cx">         if response is None or response.code / 100 != 2:
</span><del>-            log.error(&quot;Unable to discover secondary server: %s&quot; % (testURI,))
</del><ins>+            log.error(&quot;Unable to discover secondary server: {uri}&quot;, uri=testURI)
</ins><span class="cx">             self.discovered = False
</span><span class="cx">             returnValue(False)
</span><span class="cx"> 
</span><span class="cx">         # Cache the redirect target
</span><span class="cx">         if hasattr(response, &quot;location&quot;):
</span><span class="cx">             self.uri = response.location
</span><del>-            log.debug(&quot;Redirected secondary server to: %s&quot; % (self.uri,))
</del><ins>+            log.debug(&quot;Redirected secondary server to: {uri}&quot;, uri=self.uri)
</ins><span class="cx"> 
</span><span class="cx">         # TODO: Ignoring the data from capabilities for now
</span><span class="cx"> 
</span><span class="lines">@@ -867,7 +867,7 @@
</span><span class="cx">         url = &quot;%s?action=list&quot; % (self.uri,)
</span><span class="cx">         if self.dtstamp:
</span><span class="cx">             url = &quot;%s&amp;changedsince=%s&quot; % (url, self.dtstamp,)
</span><del>-        log.debug(&quot;Getting timezone list from secondary server: %s&quot; % (url,))
</del><ins>+        log.debug(&quot;Getting timezone list from secondary server: {url}&quot;, url=url)
</ins><span class="cx">         response = (yield getURL(url))
</span><span class="cx">         if response is None or response.code / 100 != 2:
</span><span class="cx">             returnValue(None)
</span><span class="lines">@@ -888,9 +888,9 @@
</span><span class="cx">                 aliases = timezone.get(&quot;aliases&quot;, ())
</span><span class="cx">                 timezones[tzid] = TimezoneInfo(tzid, aliases, lastmod, None)
</span><span class="cx">         except (ValueError, KeyError):
</span><del>-            log.debug(&quot;Failed to parse JSON timezone list response: %s&quot; % (response.data,))
</del><ins>+            log.debug(&quot;Failed to parse JSON timezone list response: {resp}&quot;, resp=response.data)
</ins><span class="cx">             returnValue(None)
</span><del>-        log.debug(&quot;Got %s timezones from secondary server&quot; % (len(timezones),))
</del><ins>+        log.debug(&quot;Got {len} timezones from secondary server&quot;, len=len(timezones))
</ins><span class="cx"> 
</span><span class="cx">         returnValue((dtstamp, timezones,))
</span><span class="cx"> 
</span><span class="lines">@@ -899,7 +899,7 @@
</span><span class="cx">     def _getTimezoneFromServer(self, tzinfo):
</span><span class="cx">         # List all from the server
</span><span class="cx">         url = &quot;%s?action=get&amp;tzid=%s&quot; % (self.uri, tzinfo.tzid,)
</span><del>-        log.debug(&quot;Getting timezone from secondary server: %s&quot; % (url,))
</del><ins>+        log.debug(&quot;Getting timezone from secondary server: {url}&quot;, url=url)
</ins><span class="cx">         response = (yield getURL(url))
</span><span class="cx">         if response is None or response.code / 100 != 2:
</span><span class="cx">             returnValue(None)
</span><span class="lines">@@ -908,14 +908,14 @@
</span><span class="cx">         ct = ct.split(&quot;;&quot;, 1)
</span><span class="cx">         ct = ct[0]
</span><span class="cx">         if ct not in (&quot;text/calendar&quot;,):
</span><del>-            log.error(&quot;Invalid content-type '%s' for tzid : %s&quot; % (ct, tzinfo.tzid,))
</del><ins>+            log.error(&quot;Invalid content-type '{ct}' for tzid : {tzid}&quot;, ct=ct, tzid=tzinfo.tzid)
</ins><span class="cx">             returnValue(None)
</span><span class="cx"> 
</span><span class="cx">         ical = response.data
</span><span class="cx">         try:
</span><span class="cx">             calendar = Calendar.parseText(ical)
</span><span class="cx">         except InvalidData:
</span><del>-            log.error(&quot;Invalid calendar data for tzid: %s&quot; % (tzinfo.tzid,))
</del><ins>+            log.error(&quot;Invalid calendar data for tzid: {tzid}&quot;, tzid=tzinfo.tzid)
</ins><span class="cx">             returnValue(None)
</span><span class="cx">         ical = calendar.getText()
</span><span class="cx"> 
</span><span class="lines">@@ -928,7 +928,7 @@
</span><span class="cx">             with open(tzpath, &quot;w&quot;) as f:
</span><span class="cx">                 f.write(ical)
</span><span class="cx">         except IOError, e:
</span><del>-            log.error(&quot;Unable to write calendar file for %s: %s&quot; % (tzinfo.tzid, str(e),))
</del><ins>+            log.error(&quot;Unable to write calendar file for {tzid}: {ex}&quot;, tzid=tzinfo.tzid, ex=str(e))
</ins><span class="cx">         else:
</span><span class="cx">             self.timezones[tzinfo.tzid] = tzinfo
</span><span class="cx"> 
</span><span class="lines">@@ -939,4 +939,4 @@
</span><span class="cx">             os.remove(tzpath)
</span><span class="cx">             del self.timezones[tzid]
</span><span class="cx">         except IOError, e:
</span><del>-            log.error(&quot;Unable to write calendar file for %s: %s&quot; % (tzid, str(e),))
</del><ins>+            log.error(&quot;Unable to write calendar file for {tzid}: {ex}&quot;, tzid=tzid, ex=str(e))
</ins></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavupgradepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/upgrade.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/upgrade.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/upgrade.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -93,14 +93,14 @@
</span><span class="cx">         try:
</span><span class="cx">             uid = pwd.getpwnam(config.UserName).pw_uid
</span><span class="cx">         except KeyError:
</span><del>-            log.error(&quot;User not found: %s&quot; % (config.UserName,))
</del><ins>+            log.error(&quot;User not found: {user}&quot;, user=config.UserName)
</ins><span class="cx"> 
</span><span class="cx">     gid = -1
</span><span class="cx">     if config.GroupName:
</span><span class="cx">         try:
</span><span class="cx">             gid = grp.getgrnam(config.GroupName).gr_gid
</span><span class="cx">         except KeyError:
</span><del>-            log.error(&quot;Group not found: %s&quot; % (config.GroupName,))
</del><ins>+            log.error(&quot;Group not found: {grp}&quot;, grp=config.GroupName)
</ins><span class="cx"> 
</span><span class="cx">     return uid, gid
</span><span class="cx"> 
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx">             # Skip directories
</span><span class="cx">             continue
</span><span class="cx"> 
</span><del>-        log.debug(&quot;Processing: %s&quot; % (resPath,))
</del><ins>+        log.debug(&quot;Processing: {path}&quot;, path=resPath)
</ins><span class="cx">         needsRewrite = False
</span><span class="cx">         with open(resPath) as res:
</span><span class="cx">             data = res.read()
</span><span class="lines">@@ -151,12 +151,12 @@
</span><span class="cx">             try:
</span><span class="cx">                 data, fixed = fixBadQuotes(data)
</span><span class="cx">                 if fixed:
</span><del>-                    log.warn(&quot;Fixing bad quotes in %s&quot; % (resPath,))
</del><ins>+                    log.warn(&quot;Fixing bad quotes in {path}&quot;, path=resPath)
</ins><span class="cx">                     needsRewrite = True
</span><span class="cx">             except Exception, e:
</span><span class="cx">                 log.error(
</span><del>-                    &quot;Error while fixing bad quotes in %s: %s&quot; %
-                    (resPath, e)
</del><ins>+                    &quot;Error while fixing bad quotes in {path}: {ex}&quot;,
+                    path=resPath, ex=e,
</ins><span class="cx">                 )
</span><span class="cx">                 errorOccurred = True
</span><span class="cx">                 continue
</span><span class="lines">@@ -164,12 +164,12 @@
</span><span class="cx">             try:
</span><span class="cx">                 data, fixed = removeIllegalCharacters(data)
</span><span class="cx">                 if fixed:
</span><del>-                    log.warn(&quot;Removing illegal characters in %s&quot; % (resPath,))
</del><ins>+                    log.warn(&quot;Removing illegal characters in {path}&quot;, path=resPath)
</ins><span class="cx">                     needsRewrite = True
</span><span class="cx">             except Exception, e:
</span><span class="cx">                 log.error(
</span><del>-                    &quot;Error while removing illegal characters in %s: %s&quot; %
-                    (resPath, e)
</del><ins>+                    &quot;Error while removing illegal characters in {path}: {ex}&quot;,
+                    path=resPath, ex=e,
</ins><span class="cx">                 )
</span><span class="cx">                 errorOccurred = True
</span><span class="cx">                 continue
</span><span class="lines">@@ -177,12 +177,12 @@
</span><span class="cx">             try:
</span><span class="cx">                 data, fixed = (yield normalizeCUAddrs(data, directory, cuaCache))
</span><span class="cx">                 if fixed:
</span><del>-                    log.debug(&quot;Normalized CUAddrs in %s&quot; % (resPath,))
</del><ins>+                    log.debug(&quot;Normalized CUAddrs in {path}&quot;, path=resPath)
</ins><span class="cx">                     needsRewrite = True
</span><span class="cx">             except Exception, e:
</span><span class="cx">                 log.error(
</span><del>-                    &quot;Error while normalizing %s: %s&quot; %
-                    (resPath, e)
</del><ins>+                    &quot;Error while normalizing {path}: {ex}&quot;,
+                    path=resPath, ex=e,
</ins><span class="cx">                 )
</span><span class="cx">                 errorOccurred = True
</span><span class="cx">                 continue
</span><span class="lines">@@ -229,7 +229,7 @@
</span><span class="cx"> 
</span><span class="cx">     errorOccurred = False
</span><span class="cx"> 
</span><del>-    log.debug(&quot;Upgrading calendar home: %s&quot; % (homePath,))
</del><ins>+    log.debug(&quot;Upgrading calendar home: {path}&quot;, path=homePath)
</ins><span class="cx"> 
</span><span class="cx">     try:
</span><span class="cx">         for cal in os.listdir(homePath):
</span><span class="lines">@@ -242,7 +242,7 @@
</span><span class="cx">                 # Delete the old, now obsolete, notifications directory.
</span><span class="cx">                 rmdir(calPath)
</span><span class="cx">                 continue
</span><del>-            log.debug(&quot;Upgrading calendar: %s&quot; % (calPath,))
</del><ins>+            log.debug(&quot;Upgrading calendar: {path}&quot;, path=calPath)
</ins><span class="cx">             if not (yield upgradeCalendarCollection(calPath, directory, cuaCache)):
</span><span class="cx">                 errorOccurred = True
</span><span class="cx"> 
</span><span class="lines">@@ -265,7 +265,7 @@
</span><span class="cx">                 except:
</span><span class="cx">                     raise
</span><span class="cx">     except Exception, e:
</span><del>-        log.error(&quot;Failed to upgrade calendar home %s: %s&quot; % (homePath, e))
</del><ins>+        log.error(&quot;Failed to upgrade calendar home {path}: {ex}&quot;, path=homePath, ex=e)
</ins><span class="cx">         raise
</span><span class="cx"> 
</span><span class="cx">     returnValue(errorOccurred)
</span><span class="lines">@@ -319,8 +319,8 @@
</span><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">         log.debug(
</span><del>-            &quot;Moved the calendar user proxy database from '%s' to '%s'.&quot;
-            % (oldDbPath, newDbPath,)
</del><ins>+            &quot;Moved the calendar user proxy database from '{old}' to '{new}'.&quot;,
+            old=oldDbPath, new=newDbPath
</ins><span class="cx">         )
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -375,8 +375,8 @@
</span><span class="cx">             # Now delete the on disk representation of principals
</span><span class="cx">             rmdir(oldPrincipals)
</span><span class="cx">             log.debug(
</span><del>-                &quot;Removed the old principal directory at '%s'.&quot;
-                % (oldPrincipals,)
</del><ins>+                &quot;Removed the old principal directory at '{path}'.&quot;,
+                path=oldPrincipals,
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">         calRoot = os.path.join(docRoot, &quot;calendars&quot;)
</span><span class="lines">@@ -386,7 +386,7 @@
</span><span class="cx"> 
</span><span class="cx">             # Move calendar homes to new location:
</span><span class="cx"> 
</span><del>-            log.warn(&quot;Moving calendar homes to %s&quot; % (uidHomes,))
</del><ins>+            log.warn(&quot;Moving calendar homes to {path}&quot;, path=uidHomes)
</ins><span class="cx"> 
</span><span class="cx">             if os.path.exists(uidHomes):
</span><span class="cx">                 for home in os.listdir(uidHomes):
</span><span class="lines">@@ -470,7 +470,7 @@
</span><span class="cx">                 os.chown(inboxItemsFile, uid, gid)
</span><span class="cx"> 
</span><span class="cx">             if total:
</span><del>-                log.warn(&quot;Processing %d calendar homes in %s&quot; % (total, uidHomes))
</del><ins>+                log.warn(&quot;Processing {total} calendar homes in {path}&quot;, total=total, path=uidHomes)
</ins><span class="cx"> 
</span><span class="cx">                 # Upgrade calendar homes in the new location:
</span><span class="cx">                 count = 0
</span><span class="lines">@@ -495,8 +495,8 @@
</span><span class="cx">                                     count += 1
</span><span class="cx">                                     if count % 10 == 0:
</span><span class="cx">                                         log.warn(
</span><del>-                                            &quot;Processed calendar home %d of %d&quot;
-                                            % (count, total)
</del><ins>+                                            &quot;Processed calendar home {count} of {total}&quot;,
+                                            count=count, total=total,
</ins><span class="cx">                                         )
</span><span class="cx">                 log.warn(&quot;Done processing calendar homes&quot;)
</span><span class="cx"> 
</span><span class="lines">@@ -569,7 +569,7 @@
</span><span class="cx"> 
</span><span class="cx">     def flattenHome(calHome):
</span><span class="cx"> 
</span><del>-        log.debug(&quot;Flattening calendar home: %s&quot; % (calHome,))
</del><ins>+        log.debug(&quot;Flattening calendar home: {path}&quot;, path=calHome)
</ins><span class="cx"> 
</span><span class="cx">         try:
</span><span class="cx">             for cal in os.listdir(calHome):
</span><span class="lines">@@ -598,19 +598,19 @@
</span><span class="cx"> #                                newPath = os.path.join(calHome, child)
</span><span class="cx"> #                                if os.path.exists(newPath):
</span><span class="cx"> #                                    newPath = os.path.join(calHome, str(uuid.uuid4()))
</span><del>-#                                log.debug(&quot;Moving up calendar: %s&quot; % (childCollection,))
</del><ins>+#                                log.debug(&quot;Moving up calendar: {path}&quot;, path=childCollection)
</ins><span class="cx"> #                                os.rename(childCollection, newPath)
</span><span class="cx"> #                            else:
</span><span class="cx"> #                                scanCollection(childCollection)
</span><span class="cx"> 
</span><span class="cx">                 if os.path.isdir(calPath):
</span><del>-                    # log.debug(&quot;Regular collection scan: %s&quot; % (calPath,))
</del><ins>+                    # log.debug(&quot;Regular collection scan: {path}&quot;, path=calPath)
</ins><span class="cx">                     # scanCollection(calPath)
</span><del>-                    log.warn(&quot;Regular collection hidden: %s&quot; % (calPath,))
</del><ins>+                    log.warn(&quot;Regular collection hidden: {path}&quot;, path=calPath)
</ins><span class="cx">                     os.rename(calPath, os.path.join(calHome, &quot;.collection.&quot; + os.path.basename(calPath)))
</span><span class="cx"> 
</span><span class="cx">         except Exception, e:
</span><del>-            log.error(&quot;Failed to upgrade calendar home %s: %s&quot; % (calHome, e))
</del><ins>+            log.error(&quot;Failed to upgrade calendar home {path}: {ex}&quot;, path=calHome, ex=e)
</ins><span class="cx">             return succeed(False)
</span><span class="cx"> 
</span><span class="cx">         return succeed(True)
</span><span class="lines">@@ -780,7 +780,7 @@
</span><span class="cx">     docRoot = config.DocumentRoot
</span><span class="cx"> 
</span><span class="cx">     if not os.path.exists(docRoot):
</span><del>-        log.info(&quot;DocumentRoot (%s) doesn't exist; skipping migration&quot; % (docRoot,))
</del><ins>+        log.info(&quot;DocumentRoot ({path}) doesn't exist; skipping migration&quot;, path=docRoot)
</ins><span class="cx">         return
</span><span class="cx"> 
</span><span class="cx">     versionFilePath = os.path.join(docRoot, &quot;.calendarserver_version&quot;)
</span><span class="lines">@@ -792,22 +792,22 @@
</span><span class="cx">                 onDiskVersion = int(versionFile.read().strip())
</span><span class="cx">         except IOError:
</span><span class="cx">             log.error(
</span><del>-                &quot;Cannot open %s; skipping migration&quot; %
-                (versionFilePath,)
</del><ins>+                &quot;Cannot open {path}; skipping migration&quot;,
+                path=versionFilePath,
</ins><span class="cx">             )
</span><span class="cx">         except ValueError:
</span><span class="cx">             log.error(
</span><del>-                &quot;Invalid version number in %s; skipping migration&quot; %
-                (versionFilePath,)
</del><ins>+                &quot;Invalid version number in {path}; skipping migration&quot;,
+                path=versionFilePath,
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">     uid, gid = getCalendarServerIDs(config)
</span><span class="cx"> 
</span><span class="cx">     for version, method in upgradeMethods:
</span><span class="cx">         if onDiskVersion &lt; version:
</span><del>-            log.warn(&quot;Upgrading to version %d&quot; % (version,))
</del><ins>+            log.warn(&quot;Upgrading to version {vers}&quot;, vers=version)
</ins><span class="cx">             (yield method(config, directory))
</span><del>-            log.warn(&quot;Upgraded to version %d&quot; % (version,))
</del><ins>+            log.warn(&quot;Upgraded to version {vers}&quot;, vers=version)
</ins><span class="cx">             with open(versionFilePath, &quot;w&quot;) as verFile:
</span><span class="cx">                 verFile.write(str(version))
</span><span class="cx">             os.chown(versionFilePath, uid, gid)
</span><span class="lines">@@ -841,7 +841,7 @@
</span><span class="cx">     record = yield directory.recordWithShortName(directory.oldNameToRecordType(recordType), shortName)
</span><span class="cx">     if record is None:
</span><span class="cx">         # We will simply ignore this and not write out an fb-set entry
</span><del>-        log.error(&quot;Can't update free-busy href; %s is not in the directory&quot; % shortName)
</del><ins>+        log.error(&quot;Can't update free-busy href; {user} is not in the directory&quot;, user=shortName)
</ins><span class="cx">         returnValue(&quot;&quot;)
</span><span class="cx"> 
</span><span class="cx">     uid = record.uid
</span><span class="lines">@@ -1023,7 +1023,7 @@
</span><span class="cx"> 
</span><span class="cx">             if augmentRecords:
</span><span class="cx">                 yield augmentService.addAugmentRecords(augmentRecords)
</span><del>-            log.warn(&quot;Migrated %d auto-schedule settings&quot; % (len(augmentRecords),))
</del><ins>+            log.warn(&quot;Migrated {len} auto-schedule settings&quot;, len=len(augmentRecords))
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -1227,24 +1227,24 @@
</span><span class="cx">                 totalItems = len(itemsToProcess)
</span><span class="cx">                 ignoreUUIDs = set()
</span><span class="cx">                 for ctr, inboxItem in enumerate(itemsToProcess):
</span><del>-                    log.info(&quot;Processing %d/%d inbox item: %s&quot; % (ctr + 1, totalItems, inboxItem,))
</del><ins>+                    log.info(&quot;Processing {ctr}/{total} inbox item: {item}&quot;, ctr=ctr + 1, total=totalItems, item=inboxItem)
</ins><span class="cx">                     ignore, uuid, ignore, fileName = inboxItem.rsplit(&quot;/&quot;, 3)
</span><span class="cx"> 
</span><span class="cx">                     if uuid in ignoreUUIDs:
</span><del>-                        log.debug(&quot;Ignored inbox item - uuid ignored: %s&quot; % (inboxItem,))
</del><ins>+                        log.debug(&quot;Ignored inbox item - uuid ignored: {item}&quot;, item=inboxItem)
</ins><span class="cx">                         inboxItems.remove(inboxItem)
</span><span class="cx">                         continue
</span><span class="cx"> 
</span><span class="cx">                     record = yield directory.recordWithUID(uuid)
</span><span class="cx">                     if record is None:
</span><del>-                        log.debug(&quot;Ignored inbox item - no record: %s&quot; % (inboxItem,))
</del><ins>+                        log.debug(&quot;Ignored inbox item - no record: {item}&quot;, item=inboxItem)
</ins><span class="cx">                         inboxItems.remove(inboxItem)
</span><span class="cx">                         ignoreUUIDs.add(uuid)
</span><span class="cx">                         continue
</span><span class="cx"> 
</span><span class="cx">                     principal = yield principalCollection.principalForRecord(record)
</span><span class="cx">                     if principal is None or not isinstance(principal, DirectoryCalendarPrincipalResource):
</span><del>-                        log.debug(&quot;Ignored inbox item - no principal: %s&quot; % (inboxItem,))
</del><ins>+                        log.debug(&quot;Ignored inbox item - no principal: {item}&quot;, item=inboxItem)
</ins><span class="cx">                         inboxItems.remove(inboxItem)
</span><span class="cx">                         ignoreUUIDs.add(uuid)
</span><span class="cx">                         continue
</span><span class="lines">@@ -1260,7 +1260,7 @@
</span><span class="cx">                     try:
</span><span class="cx">                         calendarHome = yield principal.calendarHome(request)
</span><span class="cx">                         if calendarHome is None:
</span><del>-                            log.debug(&quot;Ignored inbox item - no calendar home: %s&quot; % (inboxItem,))
</del><ins>+                            log.debug(&quot;Ignored inbox item - no calendar home: {item}&quot;, item=inboxItem)
</ins><span class="cx">                             inboxItems.remove(inboxItem)
</span><span class="cx">                             ignoreUUIDs.add(uuid)
</span><span class="cx">                             continue
</span><span class="lines">@@ -1288,13 +1288,13 @@
</span><span class="cx">                                     )
</span><span class="cx">                                 except Exception, e:
</span><span class="cx">                                     log.error(
</span><del>-                                        &quot;Error processing inbox item: %s (%s)&quot;
-                                        % (inboxItem, e)
</del><ins>+                                        &quot;Error processing inbox item: {item} ({ex})&quot;,
+                                        item=inboxItem, ex=e,
</ins><span class="cx">                                     )
</span><span class="cx">                             else:
</span><del>-                                log.debug(&quot;Ignored inbox item - no resource: %s&quot; % (inboxItem,))
</del><ins>+                                log.debug(&quot;Ignored inbox item - no resource: {item}&quot;, item=inboxItem)
</ins><span class="cx">                         else:
</span><del>-                            log.debug(&quot;Ignored inbox item - no inbox: %s&quot; % (inboxItem,))
</del><ins>+                            log.debug(&quot;Ignored inbox item - no inbox: {item}&quot;, item=inboxItem)
</ins><span class="cx"> 
</span><span class="cx">                         inboxItems.remove(inboxItem)
</span><span class="cx"> 
</span><span class="lines">@@ -1305,7 +1305,7 @@
</span><span class="cx">             # FIXME: Some generic exception handlers to deal with unexpected errors that for some reason
</span><span class="cx">             # we are not logging properly.
</span><span class="cx">             except Exception, e:
</span><del>-                log.error(&quot;Exception during inbox item processing: %s&quot; % (e,))
</del><ins>+                log.error(&quot;Exception during inbox item processing: {ex}&quot;, ex=e)
</ins><span class="cx"> 
</span><span class="cx">             except:
</span><span class="cx">                 log.error(&quot;Unknown exception during inbox item processing.&quot;)
</span><span class="lines">@@ -1336,7 +1336,7 @@
</span><span class="cx">         the inbox item.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-        log.debug(&quot;Processing inbox item %s&quot; % (inboxItem,))
</del><ins>+        log.debug(&quot;Processing inbox item {item}&quot;, item=inboxItem)
</ins><span class="cx"> 
</span><span class="cx">         txn = request._newStoreTransaction
</span><span class="cx"> 
</span><span class="lines">@@ -1351,7 +1351,7 @@
</span><span class="cx">         if calendar.mainType() is not None:
</span><span class="cx">             try:
</span><span class="cx">                 method = calendar.propertyValue(&quot;METHOD&quot;)
</span><del>-                log.info(&quot;Inbox item method is %s&quot; % (method,))
</del><ins>+                log.info(&quot;Inbox item method is {method}&quot;, method=method)
</ins><span class="cx">             except ValueError:
</span><span class="cx">                 returnValue(None)
</span><span class="cx"> 
</span><span class="lines">@@ -1374,7 +1374,7 @@
</span><span class="cx">                 internal_request=False, noAttendeeRefresh=True
</span><span class="cx">             )
</span><span class="cx">         else:
</span><del>-            log.warn(&quot;Removing invalid inbox item: %s&quot; % (uri,))
</del><ins>+            log.warn(&quot;Removing invalid inbox item: {uri}&quot;, uri=uri)
</ins><span class="cx"> 
</span><span class="cx">         #
</span><span class="cx">         # Remove item
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/util.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/util.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/util.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -128,14 +128,14 @@
</span><span class="cx">         try:
</span><span class="cx">             cpuCount = getNCPU()
</span><span class="cx">         except NotImplementedError, e:
</span><del>-            log.error(&quot;Unable to detect number of CPUs: %s&quot; % (str(e),))
</del><ins>+            log.error(&quot;Unable to detect number of CPUs: {ex}&quot;, ex=str(e))
</ins><span class="cx">             return minimum
</span><span class="cx"> 
</span><span class="cx">     if memSize is None:
</span><span class="cx">         try:
</span><span class="cx">             memSize = getMemorySize()
</span><span class="cx">         except NotImplementedError, e:
</span><del>-            log.error(&quot;Unable to detect amount of installed RAM: %s&quot; % (str(e),))
</del><ins>+            log.error(&quot;Unable to detect amount of installed RAM: {ex}&quot;, ex=str(e))
</ins><span class="cx">             return minimum
</span><span class="cx"> 
</span><span class="cx">     countByCore = perCPU * cpuCount
</span><span class="lines">@@ -384,7 +384,7 @@
</span><span class="cx"> 
</span><span class="cx">         self.factory.retried = True
</span><span class="cx"> 
</span><del>-        # self.log.debug(&quot;Got a 401 trying to inject [%s]&quot; % (self.headers,))
</del><ins>+        # self.log.debug(&quot;Got a 401 trying to inject [{hdrs}]&quot;, hdrs=self.headers)
</ins><span class="cx">         details = {}
</span><span class="cx">         basicAvailable = digestAvailable = False
</span><span class="cx">         wwwauth = self.headers.get(&quot;www-authenticate&quot;)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtwistedcaldavvcardpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/vcard.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/vcard.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/twistedcaldav/vcard.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -564,17 +564,17 @@
</span><span class="cx">         @raise InvalidVCardDataError: if the given vcard data is not valid.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         if self.name() != &quot;VCARD&quot;:
</span><del>-            log.debug(&quot;Not a vcard: %s&quot; % (self,))
</del><ins>+            log.debug(&quot;Not a vcard: {s!r}&quot;, s=self)
</ins><span class="cx">             raise InvalidVCardDataError(&quot;Not a vcard&quot;)
</span><span class="cx"> 
</span><span class="cx">         # Do underlying vCard library validation with data fix
</span><span class="cx">         fixed, unfixed = self._pycard.validate(doFix=doFix)
</span><span class="cx">         if unfixed:
</span><del>-            log.debug(&quot;vCard data had unfixable problems:\n  %s&quot; % (&quot;\n  &quot;.join(unfixed),))
</del><ins>+            log.debug(&quot;vCard data had unfixable problems:\n  {problems}&quot;, problems=&quot;\n  &quot;.join(unfixed))
</ins><span class="cx">             if doRaise:
</span><span class="cx">                 raise InvalidVCardDataError(&quot;Address data had unfixable problems:\n  %s&quot; % (&quot;\n  &quot;.join(unfixed),))
</span><span class="cx">         if fixed:
</span><del>-            log.debug(&quot;vCard data had fixable problems:\n  %s&quot; % (&quot;\n  &quot;.join(fixed),))
</del><ins>+            log.debug(&quot;vCard data had fixable problems:\n  {problems}&quot;, problems=&quot;\n  &quot;.join(fixed))
</ins><span class="cx"> 
</span><span class="cx">         return fixed, unfixed
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavbasedatastoresubpostgrespy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/base/datastore/subpostgres.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/base/datastore/subpostgres.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/base/datastore/subpostgres.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -82,14 +82,14 @@
</span><span class="cx">     def outReceived(self, out):
</span><span class="cx">         for line in out.split(&quot;\n&quot;):
</span><span class="cx">             if line:
</span><del>-                self.log.info(&quot;{message}&quot;, message=line)
</del><ins>+                self.log.info(&quot;{msg}&quot;, msg=line)
</ins><span class="cx">         # self.lineReceiver.dataReceived(out)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def errReceived(self, err):
</span><span class="cx">         for line in err.split(&quot;\n&quot;):
</span><span class="cx">             if line:
</span><del>-                self.log.error(&quot;{message}&quot;, message=line)
</del><ins>+                self.log.error(&quot;{msg}&quot;, msg=line)
</ins><span class="cx">         self.lineReceiver.dataReceived(err)
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavbasedatastoreutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/base/datastore/util.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/base/datastore/util.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/base/datastore/util.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -162,8 +162,7 @@
</span><span class="cx">         uu = UUID(normstr)
</span><span class="cx">     except ValueError:
</span><span class="cx">         if isURI:
</span><del>-            log.info(format=&quot;normalizing urn:uuid: without UUID: %(uid)r&quot;,
-                     uid=somestr)
</del><ins>+            log.info(&quot;normalizing urn:uuid: without UUID: {uid!r}&quot;, uid=somestr)
</ins><span class="cx">         # not a UUID, whatever
</span><span class="cx">         return somestr
</span><span class="cx">     else:
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavbasepropertystoretestbasepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/base/propertystore/test/base.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/base/propertystore/test/base.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/base/propertystore/test/base.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -602,6 +602,7 @@
</span><span class="cx"> 
</span><span class="cx">         self.assertEquals(self.propertyStore.get(name, None), None)
</span><span class="cx">         self.assertEquals(len(self.propertyStore), 0)
</span><ins>+        self.flushLoggedErrors()
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastorefilepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/file.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/file.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/file.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -484,10 +484,10 @@
</span><span class="cx">         fixed, unfixed = component.validCalendarData(doFix=True, doRaise=False)
</span><span class="cx"> 
</span><span class="cx">         if unfixed:
</span><del>-            self.log.error(&quot;Calendar data at %s had unfixable problems:\n  %s&quot; % (self._path.path, &quot;\n  &quot;.join(unfixed),))
</del><ins>+            self.log.error(&quot;Calendar data at {path} had unfixable problems:\n  {problems}&quot;, path=self._path.path, problems=&quot;\n  &quot;.join(unfixed))
</ins><span class="cx"> 
</span><span class="cx">         if fixed:
</span><del>-            self.log.error(&quot;Calendar data at %s had fixable problems:\n  %s&quot; % (self._path.path, &quot;\n  &quot;.join(fixed),))
</del><ins>+            self.log.error(&quot;Calendar data at {path} had fixable problems:\n  {problems}&quot;, path=self._path.path, problems=&quot;\n  &quot;.join(fixed))
</ins><span class="cx"> 
</span><span class="cx">         return component
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreindex_filepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/index_file.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/index_file.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/index_file.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx">             name_utf8 = name.encode(&quot;utf-8&quot;)
</span><span class="cx">             if name is not None and self.resource.getChild(name_utf8) is None:
</span><span class="cx">                 # Clean up
</span><del>-                log.error(&quot;Stale resource record found for child %s with UID %s in %s&quot; % (name, uid, self.resource))
</del><ins>+                log.error(&quot;Stale resource record found for child {name} with UID {uid} in {rsrc!r}&quot;, name=name, uid=uid, resource=self.resource)
</ins><span class="cx">                 self._delete_from_db(name, uid, False)
</span><span class="cx">                 self._db_commit()
</span><span class="cx">             else:
</span><span class="lines">@@ -270,7 +270,7 @@
</span><span class="cx">         names = self.notExpandedBeyond(minDate)
</span><span class="cx">         # Actually expand recurrence max
</span><span class="cx">         for name in names:
</span><del>-            self.log.info(&quot;Search falls outside range of index for %s %s&quot; % (name, minDate))
</del><ins>+            self.log.info(&quot;Search falls outside range of index for {name} {date}&quot;, name=name, date=minDate)
</ins><span class="cx">             self.reExpandResource(name, minDate)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -383,8 +383,10 @@
</span><span class="cx">                     del row[9]
</span><span class="cx">                 results.append(row)
</span><span class="cx">             else:
</span><del>-                log.error(&quot;Calendar resource %s is missing from %s. Removing from index.&quot;
-                          % (name, self.resource))
</del><ins>+                log.error(
+                    &quot;Calendar resource {name} is missing from {rsrc!r}. Removing from index.&quot;,
+                    name=name, rsrc=self.resource,
+                )
</ins><span class="cx">                 self.deleteResource(name)
</span><span class="cx"> 
</span><span class="cx">         return results
</span><span class="lines">@@ -406,9 +408,10 @@
</span><span class="cx">             if self.resource.getChild(name.encode(&quot;utf-8&quot;)):
</span><span class="cx">                 results.append(row)
</span><span class="cx">             else:
</span><del>-                log.error(&quot;Calendar resource %s is missing from %s. Removing from index.&quot;
-                          % (name, self.resource))
-                self.deleteResource(name)
</del><ins>+                log.error(
+                    &quot;Calendar resource {name} is missing from {rsrc!r}. Removing from index.&quot;,
+                    name=name, rsrc=self.resource,
+                )
</ins><span class="cx"> 
</span><span class="cx">         return results
</span><span class="cx"> 
</span><span class="lines">@@ -735,7 +738,7 @@
</span><span class="cx">             instances = calendar.expandTimeRanges(expand, ignoreInvalidInstances=reCreate)
</span><span class="cx">             recurrenceLimit = instances.limit
</span><span class="cx">         except InvalidOverriddenInstanceError, e:
</span><del>-            log.error(&quot;Invalid instance %s when indexing %s in %s&quot; % (e.rid, name, self.resource,))
</del><ins>+            log.error(&quot;Invalid instance {rid} when indexing {name} in {rsrc!r}&quot;, rid=e.rid, name=name, rsrc=self.resource)
</ins><span class="cx">             raise
</span><span class="cx"> 
</span><span class="cx">         # Now coerce indexing to off if needed
</span><span class="lines">@@ -876,9 +879,9 @@
</span><span class="cx"> 
</span><span class="cx">     def reserveUID(self, uid):
</span><span class="cx">         uid = uid.encode('utf-8')
</span><del>-        self.log.debug(&quot;Reserving UID %r @ %r&quot; % (
-            uid,
-            self.index.resource.fp.path)
</del><ins>+        self.log.debug(
+            &quot;Reserving UID {uid} @ {path}&quot;,
+            uid=uid, path=self.index.resource.fp.path,
</ins><span class="cx">         )
</span><span class="cx"> 
</span><span class="cx">         def _handleFalse(result):
</span><span class="lines">@@ -897,9 +900,9 @@
</span><span class="cx"> 
</span><span class="cx">     def unreserveUID(self, uid):
</span><span class="cx">         uid = uid.encode('utf-8')
</span><del>-        self.log.debug(&quot;Unreserving UID %r @ %r&quot; % (
-            uid,
-            self.index.resource.fp.path)
</del><ins>+        self.log.debug(
+            &quot;Unreserving UID {uid} @ {path}&quot;,
+            uid=uid, path=self.index.resource.fp.path,
</ins><span class="cx">         )
</span><span class="cx"> 
</span><span class="cx">         def _handleFalse(result):
</span><span class="lines">@@ -916,9 +919,9 @@
</span><span class="cx"> 
</span><span class="cx">     def isReservedUID(self, uid):
</span><span class="cx">         uid = uid.encode('utf-8')
</span><del>-        self.log.debug(&quot;Is reserved UID %r @ %r&quot; % (
-            uid,
-            self.index.resource.fp.path)
</del><ins>+        self.log.debug(
+            &quot;Is reserved UID {uid} @ {path}&quot;,
+            uid=uid, path=self.index.resource.fp.path,
</ins><span class="cx">         )
</span><span class="cx"> 
</span><span class="cx">         def _checkValue((flags, value)):
</span><span class="lines">@@ -956,7 +959,7 @@
</span><span class="cx">                 % (uid, self.index.resource)
</span><span class="cx">             )
</span><span class="cx">         except sqlite.Error, e:
</span><del>-            log.error(&quot;Unable to reserve UID: %s&quot;, (e,))
</del><ins>+            log.error(&quot;Unable to reserve UID: {ex}&quot;, ex=e)
</ins><span class="cx">             self.index._db_rollback()
</span><span class="cx">             raise
</span><span class="cx"> 
</span><span class="lines">@@ -980,7 +983,7 @@
</span><span class="cx">                         &quot;delete from RESERVED where UID = :1&quot;, uid)
</span><span class="cx">                     self.index._db_commit()
</span><span class="cx">                 except sqlite.Error, e:
</span><del>-                    log.error(&quot;Unable to unreserve UID: %s&quot;, (e,))
</del><ins>+                    log.error(&quot;Unable to unreserve UID: {ex}&quot;, ex=e)
</ins><span class="cx">                     self.index._db_rollback()
</span><span class="cx">                     raise
</span><span class="cx"> 
</span><span class="lines">@@ -1008,7 +1011,7 @@
</span><span class="cx">                     self.index._db_execute(&quot;delete from RESERVED where UID = :1&quot;, uid)
</span><span class="cx">                     self.index._db_commit()
</span><span class="cx">                 except sqlite.Error, e:
</span><del>-                    log.error(&quot;Unable to unreserve UID: %s&quot;, (e,))
</del><ins>+                    log.error(&quot;Unable to unreserve UID: {ex}&quot;, ex=e)
</ins><span class="cx">                     self.index._db_rollback()
</span><span class="cx">                     raise
</span><span class="cx">                 return False
</span><span class="lines">@@ -1112,7 +1115,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 stream = child.open()
</span><span class="cx">             except (IOError, OSError), e:
</span><del>-                log.error(&quot;Unable to open resource %s: %s&quot; % (name, e))
</del><ins>+                log.error(&quot;Unable to open resource {name}: {ex}&quot;, name=name, ex=e)
</ins><span class="cx">                 continue
</span><span class="cx"> 
</span><span class="cx">             # FIXME: This is blocking I/O
</span><span class="lines">@@ -1121,9 +1124,9 @@
</span><span class="cx">                 calendar.validCalendarData()
</span><span class="cx">                 calendar.validCalendarForCalDAV(methodAllowed=False)
</span><span class="cx">             except ValueError:
</span><del>-                log.error(&quot;Non-calendar resource: %s&quot; % (name,))
</del><ins>+                log.error(&quot;Non-calendar resource: {name}&quot;, name=name)
</ins><span class="cx">             else:
</span><del>-                # og.info(&quot;Indexing resource: %s&quot; % (name,))
</del><ins>+                # og.info(&quot;Indexing resource: {name}&quot;, name=name)
</ins><span class="cx">                 self.addResource(name, calendar, True, reCreate=True)
</span><span class="cx">             finally:
</span><span class="cx">                 stream.close()
</span><span class="lines">@@ -1227,7 +1230,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 stream = child.open()
</span><span class="cx">             except (IOError, OSError), e:
</span><del>-                log.error(&quot;Unable to open resource %s: %s&quot; % (name, e))
</del><ins>+                log.error(&quot;Unable to open resource {name}: {ex}&quot;, name=name, ex=e)
</ins><span class="cx">                 continue
</span><span class="cx"> 
</span><span class="cx">             # FIXME: This is blocking I/O
</span><span class="lines">@@ -1236,9 +1239,9 @@
</span><span class="cx">                 calendar.validCalendarData()
</span><span class="cx">                 calendar.validCalendarForCalDAV(methodAllowed=True)
</span><span class="cx">             except ValueError:
</span><del>-                log.error(&quot;Non-calendar resource: %s&quot; % (name,))
</del><ins>+                log.error(&quot;Non-calendar resource: {name}&quot;, name=name)
</ins><span class="cx">             else:
</span><del>-                # log.info(&quot;Indexing resource: %s&quot; % (name,))
</del><ins>+                # log.info(&quot;Indexing resource: {name}&quot;, name=name)
</ins><span class="cx">                 self.addResource(name, calendar, True, reCreate=True)
</span><span class="cx">             finally:
</span><span class="cx">                 stream.close()
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastorequeryfilterpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/query/filter.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/query/filter.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/query/filter.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -396,32 +396,32 @@
</span><span class="cx">         if level == 0:
</span><span class="cx">             # Must have VCALENDAR at the top
</span><span class="cx">             if (self.filter_name != &quot;VCALENDAR&quot;) or timerange:
</span><del>-                log.info(&quot;Top-level comp-filter must be VCALENDAR, instead: %s&quot; % (self.filter_name,))
</del><ins>+                log.info(&quot;Top-level comp-filter must be VCALENDAR, instead: {name}&quot;, name=self.filter_name)
</ins><span class="cx">                 return False
</span><span class="cx">         elif level == 1:
</span><span class="cx">             # Disallow VCALENDAR, VALARM, STANDARD, DAYLIGHT, AVAILABLE at the top, everything else is OK
</span><span class="cx">             if self.filter_name in (&quot;VCALENDAR&quot;, &quot;VALARM&quot;, &quot;STANDARD&quot;, &quot;DAYLIGHT&quot;, &quot;AVAILABLE&quot;):
</span><del>-                log.info(&quot;comp-filter wrong component type: %s&quot; % (self.filter_name,))
</del><ins>+                log.info(&quot;comp-filter wrong component type: {name}&quot;, name=self.filter_name)
</ins><span class="cx">                 return False
</span><span class="cx"> 
</span><span class="cx">             # time-range only on VEVENT, VTODO, VJOURNAL, VFREEBUSY, VAVAILABILITY
</span><span class="cx">             if timerange and self.filter_name not in (&quot;VEVENT&quot;, &quot;VTODO&quot;, &quot;VJOURNAL&quot;, &quot;VFREEBUSY&quot;, &quot;VAVAILABILITY&quot;):
</span><del>-                log.info(&quot;time-range cannot be used with component %s&quot; % (self.filter_name,))
</del><ins>+                log.info(&quot;time-range cannot be used with component {name}&quot;, name=self.filter_name)
</ins><span class="cx">                 return False
</span><span class="cx">         elif level == 2:
</span><span class="cx">             # Disallow VCALENDAR, VTIMEZONE, VEVENT, VTODO, VJOURNAL, VFREEBUSY, VAVAILABILITY at the top, everything else is OK
</span><span class="cx">             if (self.filter_name in (&quot;VCALENDAR&quot;, &quot;VTIMEZONE&quot;, &quot;VEVENT&quot;, &quot;VTODO&quot;, &quot;VJOURNAL&quot;, &quot;VFREEBUSY&quot;, &quot;VAVAILABILITY&quot;)):
</span><del>-                log.info(&quot;comp-filter wrong sub-component type: %s&quot; % (self.filter_name,))
</del><ins>+                log.info(&quot;comp-filter wrong sub-component type: {name}&quot;, name=self.filter_name)
</ins><span class="cx">                 return False
</span><span class="cx"> 
</span><span class="cx">             # time-range only on VALARM, AVAILABLE
</span><span class="cx">             if timerange and self.filter_name not in (&quot;VALARM&quot;, &quot;AVAILABLE&quot;,):
</span><del>-                log.info(&quot;time-range cannot be used with sub-component %s&quot; % (self.filter_name,))
</del><ins>+                log.info(&quot;time-range cannot be used with sub-component {name}&quot;, name=self.filter_name)
</ins><span class="cx">                 return False
</span><span class="cx">         else:
</span><span class="cx">             # Disallow all standard iCal components anywhere else
</span><span class="cx">             if (self.filter_name in (&quot;VCALENDAR&quot;, &quot;VTIMEZONE&quot;, &quot;VEVENT&quot;, &quot;VTODO&quot;, &quot;VJOURNAL&quot;, &quot;VFREEBUSY&quot;, &quot;VALARM&quot;, &quot;STANDARD&quot;, &quot;DAYLIGHT&quot;, &quot;AVAILABLE&quot;)) or timerange:
</span><del>-                log.info(&quot;comp-filter wrong standard component type: %s&quot; % (self.filter_name,))
</del><ins>+                log.info(&quot;comp-filter wrong standard component type: {name}&quot;, name=self.filter_name)
</ins><span class="cx">                 return False
</span><span class="cx"> 
</span><span class="cx">         # Test each property
</span><span class="lines">@@ -548,7 +548,7 @@
</span><span class="cx"> 
</span><span class="cx">         # time-range only on COMPLETED, CREATED, DTSTAMP, LAST-MODIFIED
</span><span class="cx">         if timerange and self.filter_name.upper() not in (&quot;COMPLETED&quot;, &quot;CREATED&quot;, &quot;DTSTAMP&quot;, &quot;LAST-MODIFIED&quot;):
</span><del>-            log.info(&quot;time-range cannot be used with property %s&quot; % (self.filter_name,))
</del><ins>+            log.info(&quot;time-range cannot be used with property {name}&quot;, name=self.filter_name)
</ins><span class="cx">             return False
</span><span class="cx"> 
</span><span class="cx">         # Test the time-range
</span><span class="lines">@@ -832,16 +832,16 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><span class="cx">         if self.start is not None and self.start.isDateOnly():
</span><del>-            log.info(&quot;start attribute in &lt;time-range&gt; is not a date-time: %s&quot; % (self.start,))
</del><ins>+            log.info(&quot;start attribute in &lt;time-range&gt; is not a date-time: {start}&quot;, start=self.start)
</ins><span class="cx">             return False
</span><span class="cx">         if self.end is not None and self.end.isDateOnly():
</span><del>-            log.info(&quot;end attribute in &lt;time-range&gt; is not a date-time: %s&quot; % (self.end,))
</del><ins>+            log.info(&quot;end attribute in &lt;time-range&gt; is not a date-time: {end}&quot;, start=self.end)
</ins><span class="cx">             return False
</span><span class="cx">         if self.start is not None and not self.start.utc():
</span><del>-            log.info(&quot;start attribute in &lt;time-range&gt; is not UTC: %s&quot; % (self.start,))
</del><ins>+            log.info(&quot;start attribute in &lt;time-range&gt; is not UTC: {start}&quot;, start=self.start)
</ins><span class="cx">             return False
</span><span class="cx">         if self.end is not None and not self.end.utc():
</span><del>-            log.info(&quot;end attribute in &lt;time-range&gt; is not UTC: %s&quot; % (self.end,))
</del><ins>+            log.info(&quot;end attribute in &lt;time-range&gt; is not UTC: {end}&quot;, start=self.end)
</ins><span class="cx">             return False
</span><span class="cx"> 
</span><span class="cx">         # No other tests
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingcaldavdeliverypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/caldav/delivery.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/caldav/delivery.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/caldav/delivery.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -14,10 +14,11 @@
</span><span class="cx"> # limitations under the License.
</span><span class="cx"> ##
</span><span class="cx"> 
</span><del>-from twext.python.log import Logger, LogLevel
</del><ins>+from twext.python.log import Logger
</ins><span class="cx"> from txweb2.dav.http import ErrorResponse
</span><span class="cx"> 
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks, returnValue, succeed
</span><ins>+from twisted.logger import LogLevel
</ins><span class="cx"> from twisted.python.failure import Failure
</span><span class="cx"> from txweb2 import responsecode
</span><span class="cx"> from txweb2.http import HTTPError
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingfreebusypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/freebusy.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/freebusy.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/freebusy.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -462,7 +462,7 @@
</span><span class="cx">                     # between our initial index query and getting here. For now we will ignore this error, but in
</span><span class="cx">                     # the longer term we need to implement some form of locking, perhaps.
</span><span class="cx">                     if calendar is None:
</span><del>-                        log.error(&quot;Calendar %s is missing from calendar collection %r&quot; % (name, calresource))
</del><ins>+                        log.error(&quot;Calendar {name} is missing from calendar collection {coll!r}&quot;, name=name, coll=calresource)
</ins><span class="cx">                         continue
</span><span class="cx"> 
</span><span class="cx">                     if self.accountingItems is not None:
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingicaldiffpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/icaldiff.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/icaldiff.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/icaldiff.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -475,7 +475,7 @@
</span><span class="cx"> 
</span><span class="cx">         result = len(propdiff) == 0
</span><span class="cx">         if not result:
</span><del>-            log.debug(&quot;VCALENDAR properties differ: %s&quot; % (propdiff,))
</del><ins>+            log.debug(&quot;VCALENDAR properties differ: {diff}&quot;, diff=propdiff)
</ins><span class="cx">         return result
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -497,7 +497,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Possible case where one ATTENDEE prop is missing - this happens with a &quot;fake&quot; master sometimes
</span><span class="cx">         if serverAttendee is None or clientAttendee is None:
</span><del>-            log.error(&quot;ATTENDEE for user making an attendee change is missing: %s&quot; % (self.attendee,))
</del><ins>+            log.error(&quot;ATTENDEE for user making an attendee change is missing: {attendee}&quot;, attendee=self.attendee)
</ins><span class="cx">             return False, False
</span><span class="cx"> 
</span><span class="cx">         if serverAttendee.parameterValue(&quot;PARTSTAT&quot;, &quot;NEEDS-ACTION&quot;) != clientAttendee.parameterValue(&quot;PARTSTAT&quot;, &quot;NEEDS-ACTION&quot;):
</span><span class="lines">@@ -642,13 +642,13 @@
</span><span class="cx">             invalidChanges = []
</span><span class="cx">             propNames = (&quot;DTSTART&quot;, &quot;DTEND&quot;, &quot;DUE&quot;, &quot;RRULE&quot;, &quot;RDATE&quot;, &quot;EXDATE&quot;)
</span><span class="cx">             invalidChanges = [propName for ctr, propName in enumerate(propNames) if serverProps[ctr] != clientProps[ctr]]
</span><del>-            log.debug(&quot;Critical properties do not match: %s&quot; % (&quot;, &quot;.join(invalidChanges),))
</del><ins>+            log.debug(&quot;Critical properties do not match: {props}&quot;, props=&quot;, &quot;.join(invalidChanges))
</ins><span class="cx">             return False
</span><span class="cx">         elif serverProps[-1] != clientProps[-1]:
</span><span class="cx">             # Bad if EXDATEs have been removed
</span><span class="cx">             missing = serverProps[-1] - clientProps[-1]
</span><span class="cx">             if missing:
</span><del>-                log.debug(&quot;EXDATEs missing: %s&quot; % (&quot;, &quot;.join([exdate.getText() for exdate in missing]),))
</del><ins>+                log.debug(&quot;EXDATEs missing: {exdates}&quot;, exdates=&quot;, &quot;.join([exdate.getText() for exdate in missing]))
</ins><span class="cx">                 return False
</span><span class="cx">             declines.extend(clientProps[-1] - serverProps[-1])
</span><span class="cx">             return True
</span><span class="lines">@@ -744,7 +744,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Possible case where ATTENDEE prop is missing - this happens with a &quot;fake&quot; master sometimes
</span><span class="cx">         if attendee is None:
</span><del>-            log.error(&quot;ATTENDEE for user making an attendee change is missing: %s&quot; % (self.attendee,))
</del><ins>+            log.error(&quot;ATTENDEE for user making an attendee change is missing: {attendee}&quot;, attendee=self.attendee)
</ins><span class="cx">             return False
</span><span class="cx"> 
</span><span class="cx">         partstatChanged = attendee.parameterValue(&quot;PARTSTAT&quot;, &quot;NEEDS-ACTION&quot;) != &quot;DECLINED&quot;
</span><span class="lines">@@ -939,7 +939,7 @@
</span><span class="cx">         assert isinstance(comp1, Component) and isinstance(comp2, Component)
</span><span class="cx"> 
</span><span class="cx">         if comp1.name() != comp2.name():
</span><del>-            log.debug(&quot;Component names are different: '%s' and '%s'&quot; % (comp1.name(), comp2.name()))
</del><ins>+            log.debug(&quot;Component names are different: '{comp1}' and '{comp2}'&quot;, comp1=comp1.name(), comp2=comp2.name())
</ins><span class="cx">             return
</span><span class="cx"> 
</span><span class="cx">         # Duplicate then normalize for comparison
</span><span class="lines">@@ -1031,4 +1031,4 @@
</span><span class="cx">             loggedUID = &quot;Unknown&quot;
</span><span class="cx">         loggedName = accounting.emitAccounting(&quot;Implicit Errors&quot;, loggedUID, logstr)
</span><span class="cx">         if loggedName:
</span><del>-            log.error(&quot;Generating Implicit Error accounting at path: %s&quot; % (loggedName,))
</del><ins>+            log.error(&quot;Generating Implicit Error accounting at path: {name}&quot;, name=loggedName)
</ins></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingimipinboundpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/imip/inbound.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/imip/inbound.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/imip/inbound.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -21,12 +21,13 @@
</span><span class="cx"> from twext.enterprise.dal.record import fromTable
</span><span class="cx"> from twext.enterprise.jobs.workitem import WorkItem, RegeneratingWorkItem
</span><span class="cx"> from twext.internet.gaiendpoint import GAIEndpoint
</span><del>-from twext.python.log import Logger, LegacyLogger
</del><ins>+from twext.python.log import Logger
</ins><span class="cx"> 
</span><span class="cx"> from twisted.application import service
</span><span class="cx"> from twisted.internet import protocol, defer, ssl
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks, returnValue, succeed
</span><span class="cx"> from twisted.mail import pop3client, imap4
</span><ins>+from twisted.python.log import LogPublisher
</ins><span class="cx"> 
</span><span class="cx"> from twistedcaldav.config import config
</span><span class="cx"> from twistedcaldav.ical import Property, Component
</span><span class="lines">@@ -48,7 +49,7 @@
</span><span class="cx"> # Monkey patch imap4.log so it doesn't emit useless logging,
</span><span class="cx"> # specifically, &quot;Unhandled unsolicited response&quot; nonsense.
</span><span class="cx"> #
</span><del>-class IMAPLogger(LegacyLogger):
</del><ins>+class IMAPLogger(LogPublisher):
</ins><span class="cx">     def msg(self, *message, **kwargs):
</span><span class="cx">         if message and message[0].startswith(&quot;Unhandled unsolicited response:&quot;):
</span><span class="cx">             return
</span><span class="lines">@@ -182,7 +183,7 @@
</span><span class="cx"> def scheduleNextMailPoll(store, seconds):
</span><span class="cx">     txn = store.newTransaction(label=&quot;scheduleNextMailPoll&quot;)
</span><span class="cx">     notBefore = datetime.datetime.utcnow() + datetime.timedelta(seconds=seconds)
</span><del>-    log.debug(&quot;Scheduling next mail poll: %s&quot; % (notBefore,))
</del><ins>+    log.debug(&quot;Scheduling next mail poll: {time}&quot;, time=notBefore)
</ins><span class="cx">     yield txn.enqueue(IMIPPollingWork, notBefore=notBefore)
</span><span class="cx">     yield txn.commit()
</span><span class="cx"> 
</span><span class="lines">@@ -287,7 +288,7 @@
</span><span class="cx">         organizer = calendar.getOrganizer()
</span><span class="cx">         token = self._extractToken(organizer)
</span><span class="cx">         if not token:
</span><del>-            log.error(&quot;Mail gateway can't find token in DSN %s&quot; % (msgId,))
</del><ins>+            log.error(&quot;Mail gateway can't find token in DSN {msgid}&quot;, msgid=msgId)
</ins><span class="cx">             return
</span><span class="cx"> 
</span><span class="cx">         txn = self.store.newTransaction(label=&quot;MailReceiver.processDSN&quot;)
</span><span class="lines">@@ -299,8 +300,9 @@
</span><span class="cx">         except:
</span><span class="cx">             # This isn't a token we recognize
</span><span class="cx">             log.error(
</span><del>-                &quot;Mail gateway found a token (%s) but didn't recognize it in message %s&quot;
-                % (token, msgId))
</del><ins>+                &quot;Mail gateway found a token ({token}) but didn't recognize it in message {msgid}&quot;,
+                token=token, msgid=msgId,
+            )
</ins><span class="cx">             returnValue(self.UNKNOWN_TOKEN)
</span><span class="cx"> 
</span><span class="cx">         calendar.removeAllButOneAttendee(record.attendee)
</span><span class="lines">@@ -316,7 +318,7 @@
</span><span class="cx">             # TODO: what to do in this case?
</span><span class="cx">             pass
</span><span class="cx"> 
</span><del>-        log.warn(&quot;Mail gateway processing DSN %s&quot; % (msgId,))
</del><ins>+        log.warn(&quot;Mail gateway processing DSN {msgid}&quot;, msgid=msgId)
</ins><span class="cx">         txn = self.store.newTransaction(label=&quot;MailReceiver.processDSN&quot;)
</span><span class="cx">         yield txn.enqueue(
</span><span class="cx">             IMIPReplyWork,
</span><span class="lines">@@ -338,12 +340,14 @@
</span><span class="cx">             if not token:
</span><span class="cx">                 log.error(
</span><span class="cx">                     &quot;Mail gateway didn't find a token in message &quot;
</span><del>-                    &quot;%s (%s)&quot; % (msg['Message-ID'], msg['To']))
</del><ins>+                    &quot;{msgid} ({to})&quot;, msgid=msg['Message-ID'], to=msg['To']
+                )
</ins><span class="cx">                 returnValue(self.NO_TOKEN)
</span><span class="cx">         else:
</span><span class="cx">             log.error(
</span><del>-                &quot;Mail gateway couldn't parse To: address (%s) in &quot;
-                &quot;message %s&quot; % (msg['To'], msg['Message-ID']))
</del><ins>+                &quot;Mail gateway couldn't parse To: address ({tp}) in &quot;
+                &quot;message {msgid}&quot;, to=msg['To'], msgid=msg['Message-ID']
+            )
</ins><span class="cx">             returnValue(self.MALFORMED_TO_ADDRESS)
</span><span class="cx"> 
</span><span class="cx">         txn = self.store.newTransaction(label=&quot;MailReceiver.processReply&quot;)
</span><span class="lines">@@ -355,9 +359,10 @@
</span><span class="cx">         except:
</span><span class="cx">             # This isn't a token we recognize
</span><span class="cx">             log.info(
</span><del>-                &quot;Mail gateway found a token (%s) but didn't &quot;
-                &quot;recognize it in message %s&quot;
-                % (token, msg['Message-ID']))
</del><ins>+                &quot;Mail gateway found a token ({token}) but didn't &quot;
+                &quot;recognize it in message {msgid}&quot;,
+                token=token, msgid=msg['Message-ID']
+            )
</ins><span class="cx">             # Any email with an unknown token which was sent over 72 hours ago
</span><span class="cx">             # is deleted.  If we can't parse the date we leave it in the inbox.
</span><span class="cx">             dateString = msg.get(&quot;Date&quot;)
</span><span class="lines">@@ -366,9 +371,8 @@
</span><span class="cx">                     dateSent = dateutil.parser.parse(dateString)
</span><span class="cx">                 except Exception, e:
</span><span class="cx">                     log.info(
</span><del>-                        &quot;Could not parse date in IMIP email '{}' ({})&quot;.format(
-                            dateString, e
-                        )
</del><ins>+                        &quot;Could not parse date in IMIP email '{date}' ({ex})&quot;,
+                        date=dateString, ex=e,
</ins><span class="cx">                     )
</span><span class="cx">                     returnValue(self.UNKNOWN_TOKEN)
</span><span class="cx">                 now = datetime.datetime.now(dateutil.tz.tzutc())
</span><span class="lines">@@ -384,7 +388,8 @@
</span><span class="cx">             # No icalendar attachment
</span><span class="cx">             log.warn(
</span><span class="cx">                 &quot;Mail gateway didn't find an icalendar attachment &quot;
</span><del>-                &quot;in message %s&quot; % (msg['Message-ID'],))
</del><ins>+                &quot;in message {msgid}&quot;, msgid=msg['Message-ID']
+            )
</ins><span class="cx"> 
</span><span class="cx">             toAddr = None
</span><span class="cx">             fromAddr = record.attendee[7:]
</span><span class="lines">@@ -401,8 +406,7 @@
</span><span class="cx"> 
</span><span class="cx">             if toAddr is None:
</span><span class="cx">                 log.error(
</span><del>-                    &quot;Don't have an email address for the organizer; &quot;
-                    &quot;ignoring reply.&quot;)
</del><ins>+                    &quot;Don't have an email address for the organizer; ignoring reply.&quot;)
</ins><span class="cx">                 returnValue(self.NO_ORGANIZER_ADDRESS)
</span><span class="cx"> 
</span><span class="cx">             settings = config.Scheduling[&quot;iMIP&quot;][&quot;Sending&quot;]
</span><span class="lines">@@ -433,8 +437,9 @@
</span><span class="cx">         if organizerProperty is None:
</span><span class="cx">             # ORGANIZER is required per rfc2446 section 3.2.3
</span><span class="cx">             log.warn(
</span><del>-                &quot;Mail gateway didn't find an ORGANIZER in REPLY %s&quot;
-                % (msg['Message-ID'],))
</del><ins>+                &quot;Mail gateway didn't find an ORGANIZER in REPLY {msgid}&quot;,
+                msgid=msg['Message-ID']
+            )
</ins><span class="cx">             event.addProperty(Property(&quot;ORGANIZER&quot;, record.organizer))
</span><span class="cx">         else:
</span><span class="cx">             organizerProperty.setValue(record.organizer)
</span><span class="lines">@@ -498,8 +503,9 @@
</span><span class="cx">                 else:
</span><span class="cx">                     # It's a DSN without enough to go on
</span><span class="cx">                     log.error(
</span><del>-                        &quot;Mail gateway can't process DSN %s&quot;
-                        % (msg['Message-ID'],))
</del><ins>+                        &quot;Mail gateway can't process DSN {msgid}&quot;,
+                        msgid=msg['Message-ID']
+                    )
</ins><span class="cx">                     return succeed(self.INCOMPLETE_DSN)
</span><span class="cx"> 
</span><span class="cx">             log.info(
</span><span class="lines">@@ -551,8 +557,9 @@
</span><span class="cx"> 
</span><span class="cx">     def cbLoginFailed(self, reason):
</span><span class="cx">         self.log.error(
</span><del>-            &quot;POP3 login failed for %s&quot; %
-            (self.factory.settings[&quot;Username&quot;],))
</del><ins>+            &quot;POP3 login failed for {user}&quot;,
+            user=self.factory.settings[&quot;Username&quot;]
+        )
</ins><span class="cx">         return self.quit()
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -571,17 +578,17 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def cbDownloaded(self, lines, id):
</span><del>-        self.log.debug(&quot;POP downloaded message %d&quot; % (id,))
</del><ins>+        self.log.debug(&quot;POP downloaded message {msgid}&quot;, msgid=id)
</ins><span class="cx">         actionTaken = (yield self.factory.handleMessage(&quot;\r\n&quot;.join(lines)))
</span><span class="cx"> 
</span><span class="cx">         if self.factory.deleteAllMail:
</span><span class="cx">             # Delete all mail we see
</span><del>-            self.log.debug(&quot;POP deleting message %d&quot; % (id,))
</del><ins>+            self.log.debug(&quot;POP deleting message {msgid}&quot;, msgid=id)
</ins><span class="cx">             self.delete(id)
</span><span class="cx">         else:
</span><span class="cx">             # Delete only mail we've processed
</span><span class="cx">             if actionTaken == MailReceiver.INJECTION_SUBMITTED:
</span><del>-                self.log.debug(&quot;POP deleting message %d&quot; % (id,))
</del><ins>+                self.log.debug(&quot;POP deleting message {msgid}&quot;, msgid=id)
</ins><span class="cx">                 self.delete(id)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -695,8 +702,9 @@
</span><span class="cx">             nextUID = self.messageUIDs.pop(0)
</span><span class="cx">             messageListToFetch = imap4.MessageSet(nextUID)
</span><span class="cx">             self.log.debug(
</span><del>-                &quot;Downloading message %d of %d (%s)&quot; %
-                (self.messageCount - len(self.messageUIDs), self.messageCount, nextUID))
</del><ins>+                &quot;Downloading message {count} of {total} ({next})&quot;,
+                count=self.messageCount - len(self.messageUIDs), total=self.messageCount, next=nextUID
+            )
</ins><span class="cx">             self.fetchMessage(messageListToFetch, True).addCallback(
</span><span class="cx">                 self.cbGotMessage, messageListToFetch).addErrback(
</span><span class="cx">                     self.ebLogError)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingimipoutboundpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/imip/outbound.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/imip/outbound.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/imip/outbound.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -380,15 +380,19 @@
</span><span class="cx"> 
</span><span class="cx">             if record is None:
</span><span class="cx">                 record = (yield txn.imipCreateToken(originator, toAddr.lower(), icaluid))
</span><del>-                self.log.debug(&quot;Mail gateway created token %s for %s &quot;
-                               &quot;(originator), %s (recipient) and %s (icaluid)&quot;
-                               % (record.token, originator, toAddr, icaluid))
</del><ins>+                self.log.debug(
+                    &quot;Mail gateway created token {token}for {orig} &quot;
+                    &quot;(originator), {recip} (recipient) and {uid} (icaluid)&quot;,
+                    token=record.token, orig=originator, recip=toAddr, uid=icaluid,
+                )
</ins><span class="cx">                 inviteState = &quot;new&quot;
</span><span class="cx"> 
</span><span class="cx">             else:
</span><del>-                self.log.debug(&quot;Mail gateway reusing token %s for %s &quot;
-                               &quot;(originator), %s (recipient) and %s (icaluid)&quot;
-                               % (record.token, originator, toAddr, icaluid))
</del><ins>+                self.log.debug(
+                    &quot;Mail gateway reusing token {token} for {orig} &quot;
+                    &quot;(originator), {recip} (recipient) and {uid} (icaluid)&quot;,
+                    token=record.token, orig=originator, recip=toAddr, uid=icaluid,
+                )
</ins><span class="cx">                 inviteState = &quot;update&quot;
</span><span class="cx">             token = record.token
</span><span class="cx"> 
</span><span class="lines">@@ -489,7 +493,7 @@
</span><span class="cx">                 fromAddr, toAddr, msgId, message))
</span><span class="cx">             returnValue(success)
</span><span class="cx">         except Exception, e:
</span><del>-            self.log.error(&quot;Failed to send IMIP message (%s)&quot; % (str(e),))
</del><ins>+            self.log.error(&quot;Failed to send IMIP message ({ex})&quot;, ex=str(e))
</ins><span class="cx">             returnValue(False)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -597,8 +601,7 @@
</span><span class="cx">         # always be present (i.e., timezones-by-reference is not allowed in iMIP).
</span><span class="cx">         calendarText = calendar.getTextWithTimezones(includeTimezones=True)
</span><span class="cx"> 
</span><del>-        self.log.debug(&quot;Mail gateway sending calendar body: %s&quot;
-                       % (calendarText,))
</del><ins>+        self.log.debug(&quot;Mail gateway sending calendar body: {body}&quot;, body=calendarText)
</ins><span class="cx">         msgIcal = MIMEText(calendarText, &quot;calendar&quot;, &quot;UTF-8&quot;)
</span><span class="cx">         method = calendar.propertyValue(&quot;METHOD&quot;).lower()
</span><span class="cx">         msgIcal.set_param(&quot;method&quot;, method)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingimplicitpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/implicit.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/implicit.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/implicit.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -1631,7 +1631,7 @@
</span><span class="cx">                             break
</span><span class="cx"> 
</span><span class="cx">                     if found_old:
</span><del>-                        log.error(&quot;valid-attendee-change: Cannot remove ATTENDEE: UID:%s&quot; % (self.uid,))
</del><ins>+                        log.error(&quot;valid-attendee-change: Cannot remove ATTENDEE: UID: {uid}&quot;, uid=self.uid)
</ins><span class="cx">                         raise HTTPError(ErrorResponse(
</span><span class="cx">                             responsecode.FORBIDDEN,
</span><span class="cx">                             (caldav_namespace, &quot;valid-attendee-change&quot;),
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingischeduledkimpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/ischedule/dkim.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/ischedule/dkim.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/ischedule/dkim.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -423,8 +423,8 @@
</span><span class="cx">         dkim_header = &quot;; &quot;.join([&quot;%s=%s&quot; % item for item in dkim_tags])
</span><span class="cx">         self.headers.addRawHeader(DKIM_SIGNATURE, dkim_header)
</span><span class="cx"> 
</span><del>-        log.debug(&quot;DKIM: Generated header: DKIM-Signature:%s&quot; % (dkim_header,))
-        log.debug(&quot;DKIM: Signed headers:\n%s&quot; % (headers,))
</del><ins>+        log.debug(&quot;DKIM: Generated header: DKIM-Signature:{hdr}&quot;, hdr=dkim_header)
+        log.debug(&quot;DKIM: Signed headers:\n{hdrs}&quot;, hdrs=headers)
</ins><span class="cx"> 
</span><span class="cx">         returnValue(signature)
</span><span class="cx"> 
</span><span class="lines">@@ -556,7 +556,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Extract the set of canonicalized headers being signed
</span><span class="cx">         headers = self.extractSignedHeaders()
</span><del>-        log.debug(&quot;DKIM: Signed headers:\n%s&quot; % (headers,))
</del><ins>+        log.debug(&quot;DKIM: Signed headers:\n{hdrs}&quot;, hdrs=headers)
</ins><span class="cx"> 
</span><span class="cx">         # Locate the public key
</span><span class="cx">         pubkey = (yield self.locatePublicKey())
</span><span class="lines">@@ -577,7 +577,7 @@
</span><span class="cx"> Public key used:
</span><span class="cx"> %s
</span><span class="cx"> &quot;&quot;&quot; % (self.headers.getRawHeaders(DKIM_SIGNATURE)[0], headers, pubkey._original_data,)
</span><del>-            log.debug(&quot;DKIM: %s:%s&quot; % (msg, _debug_msg,))
</del><ins>+            log.debug(&quot;DKIM: {msg}:{debug}&quot;, msg=msg, debug=_debug_msg)
</ins><span class="cx">             if self._debug:
</span><span class="cx">                 msg = &quot;%s:%s&quot; % (msg, _debug_msg,)
</span><span class="cx">             raise DKIMVerificationError(msg)
</span><span class="lines">@@ -595,7 +595,7 @@
</span><span class="cx"> Base64 encoded body:
</span><span class="cx"> %s
</span><span class="cx"> &quot;&quot;&quot; % (self.headers.getRawHeaders(DKIM_SIGNATURE), self.hash_method.__name__, base64.b64encode(body),)
</span><del>-            log.debug(&quot;DKIM: %s:%s&quot; % (msg, _debug_msg,))
</del><ins>+            log.debug(&quot;DKIM: {msg}:{debug}&quot;, msg=msg, debug=_debug_msg)
</ins><span class="cx">             if self._debug:
</span><span class="cx">                 msg = &quot;%s:%s&quot; % (msg, _debug_msg,)
</span><span class="cx">             raise DKIMVerificationError(msg)
</span><span class="lines">@@ -612,16 +612,16 @@
</span><span class="cx">         dkim = self.headers.getRawHeaders(DKIM_SIGNATURE)
</span><span class="cx">         if dkim is None:
</span><span class="cx">             msg = &quot;No DKIM-Signature header present in the request&quot;
</span><del>-            log.debug(&quot;DKIM: &quot; + msg)
</del><ins>+            log.debug(&quot;DKIM: {msg}&quot;, msg=msg)
</ins><span class="cx">             raise DKIMMissingError(msg)
</span><span class="cx">         if len(dkim) != 1:
</span><span class="cx">             # TODO: This might need to be changed if we ever support forwarding of iSchedule messages - the forwarder
</span><span class="cx">             # might also sign the message and add its own header
</span><span class="cx">             msg = &quot;Only one DKIM-Signature allowed in the request&quot;
</span><del>-            log.debug(&quot;DKIM: &quot; + msg)
</del><ins>+            log.debug(&quot;DKIM: {msg}&quot;, msg=msg)
</ins><span class="cx">             raise DKIMVerificationError(msg)
</span><span class="cx">         dkim = dkim[0]
</span><del>-        log.debug(&quot;DKIM: Found header: DKIM-Signature:%s&quot; % (dkim,))
</del><ins>+        log.debug(&quot;DKIM: Found header: DKIM-Signature:{hdr}&quot;, hdr=dkim)
</ins><span class="cx"> 
</span><span class="cx">         # Extract tags from the header
</span><span class="cx">         self.dkim_tags = DKIMUtils.extractTags(dkim)
</span><span class="lines">@@ -631,7 +631,7 @@
</span><span class="cx">         for tag in required_tags:
</span><span class="cx">             if tag not in self.dkim_tags:
</span><span class="cx">                 msg = &quot;Missing DKIM-Signature tag: %s&quot; % (tag,)
</span><del>-                log.debug(&quot;DKIM: &quot; + msg)
</del><ins>+                log.debug(&quot;DKIM: {msg}&quot;, msg=msg)
</ins><span class="cx">                 raise DKIMVerificationError(msg)
</span><span class="cx"> 
</span><span class="cx">         check_values = {
</span><span class="lines">@@ -652,7 +652,7 @@
</span><span class="cx">             for item in test:
</span><span class="cx">                 if item not in values:
</span><span class="cx">                     msg = &quot;Tag: %s has incorrect value: %s&quot; % (tag, self.dkim_tags[tag],)
</span><del>-                    log.debug(&quot;DKIM: &quot; + msg)
</del><ins>+                    log.debug(&quot;DKIM: {msg}&quot;, msg=msg)
</ins><span class="cx">                     raise DKIMVerificationError(msg)
</span><span class="cx"> 
</span><span class="cx">         # Check time stamp
</span><span class="lines">@@ -660,7 +660,7 @@
</span><span class="cx">             diff_time = self.time - int(self.dkim_tags[&quot;t&quot;])
</span><span class="cx">             if diff_time &lt; -360:
</span><span class="cx">                 msg = &quot;Signature time too far in the future: %d seconds&quot; % (diff_time,)
</span><del>-                log.debug(&quot;DKIM: &quot; + msg)
</del><ins>+                log.debug(&quot;DKIM: {msg}&quot;, msg=msg)
</ins><span class="cx">                 raise DKIMVerificationError(msg)
</span><span class="cx"> 
</span><span class="cx">         # Check expiration
</span><span class="lines">@@ -668,7 +668,7 @@
</span><span class="cx">             diff_time = self.time - int(self.dkim_tags[&quot;x&quot;])
</span><span class="cx">             if diff_time &gt; 0:
</span><span class="cx">                 msg = &quot;Signature expired: %d seconds&quot; % (diff_time,)
</span><del>-                log.debug(&quot;DKIM: &quot; + msg)
</del><ins>+                log.debug(&quot;DKIM: {msg}&quot;, msg=msg)
</ins><span class="cx">                 raise DKIMVerificationError(msg)
</span><span class="cx"> 
</span><span class="cx">         # Base64 encoded tags might include WSP which we need to ignore
</span><span class="lines">@@ -797,7 +797,7 @@
</span><span class="cx"> 
</span><span class="cx">             return self._makeKey(pkey)
</span><span class="cx"> 
</span><del>-        log.debug(&quot;DKIM: No valid public key: %s %s&quot; % (self._getSelectorKey(), pubkeys,))
</del><ins>+        log.debug(&quot;DKIM: No valid public key: {sel} {keys}&quot;, sel=self._getSelectorKey(), keys=pubkeys)
</ins><span class="cx">         return None
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -818,7 +818,7 @@
</span><span class="cx">             key._original_data = key_data
</span><span class="cx">             return key
</span><span class="cx">         except:
</span><del>-            log.debug(&quot;DKIM: Unable to make public key:\n%s&quot; % (key_data,))
</del><ins>+            log.debug(&quot;DKIM: Unable to make public key:\n{key}&quot;, key=key_data)
</ins><span class="cx">             return None
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -845,9 +845,9 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Do the key lookup using the actual lookup method.
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        log.debug(&quot;DKIM: TXT lookup: %s&quot; % (self._getSelectorKey(),))
</del><ins>+        log.debug(&quot;DKIM: TXT lookup: {key}&quot;, key=self._getSelectorKey())
</ins><span class="cx">         data = (yield lookupDataViaTXT(self._getSelectorKey()))
</span><del>-        log.debug(&quot;DKIM: TXT lookup results: %s\n%s&quot; % (self._getSelectorKey(), &quot;\n&quot;.join(data),))
</del><ins>+        log.debug(&quot;DKIM: TXT lookup results: {key}\n{data}&quot;, key=self._getSelectorKey(), data=&quot;\n&quot;.join(data))
</ins><span class="cx">         returnValue(tuple([DKIMUtils.extractTags(line) for line in data]))
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -875,7 +875,7 @@
</span><span class="cx">         # First we do an SRV lookup for _domainkey to get the public key server host/port
</span><span class="cx">         result = (yield lookupServerViaSRV(self.dkim_tags[&quot;d&quot;], service=&quot;_domainkey_lookup&quot;))
</span><span class="cx">         if result is None:
</span><del>-            log.debug(&quot;DKIM: SRV _domainkey failed on: %s trying domain directly&quot; % (self.dkim_tags[&quot;d&quot;],))
</del><ins>+            log.debug(&quot;DKIM: SRV _domainkey failed on: {tag} trying domain directly&quot;, tag=self.dkim_tags[&quot;d&quot;])
</ins><span class="cx">             host = self.dkim_tags[&quot;d&quot;]
</span><span class="cx">             port = &quot;&quot;
</span><span class="cx">             scheme = &quot;https&quot;
</span><span class="lines">@@ -899,20 +899,20 @@
</span><span class="cx">         # First we do an SRV lookup for _domainkey to get the public key server URI
</span><span class="cx">         uri = (yield self._getURI())
</span><span class="cx"> 
</span><del>-        log.debug(&quot;DKIM: HTTP/.well-known lookup: %s&quot; % (uri,))
</del><ins>+        log.debug(&quot;DKIM: HTTP/.well-known lookup: {uri}&quot;, uri=uri)
</ins><span class="cx">         response = (yield getURL(uri))
</span><span class="cx">         if response is None or response.code / 100 != 2:
</span><del>-            log.debug(&quot;DKIM: Failed http/well-known lookup: %s %s&quot; % (uri, response,))
</del><ins>+            log.debug(&quot;DKIM: Failed http/well-known lookup: {uri} {resp}&quot;, uri=uri, resp=response)
</ins><span class="cx">             returnValue(())
</span><span class="cx"> 
</span><span class="cx">         ct = response.headers.getRawHeaders(&quot;content-type&quot;, (&quot;bogus/type&quot;,))[0]
</span><span class="cx">         ct = ct.split(&quot;;&quot;, 1)
</span><span class="cx">         ct = ct[0].strip()
</span><span class="cx">         if ct not in (&quot;text/plain&quot;,):
</span><del>-            log.debug(&quot;DKIM: Failed http/well-known lookup: wrong content-type returned %s %s&quot; % (uri, ct,))
</del><ins>+            log.debug(&quot;DKIM: Failed http/well-known lookup: wrong content-type returned {uri} {ct}&quot;, uri=uri, ct=ct)
</ins><span class="cx">             returnValue(())
</span><span class="cx"> 
</span><del>-        log.debug(&quot;DKIM: HTTP/.well-known lookup results: %s\n%s&quot; % (uri, response.data,))
</del><ins>+        log.debug(&quot;DKIM: HTTP/.well-known lookup results: {uri}\n{resp}&quot;, uri=uri, resp=response.data)
</ins><span class="cx">         returnValue(tuple([DKIMUtils.extractTags(line) for line in response.data.splitlines()]))
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -941,19 +941,19 @@
</span><span class="cx">             return succeed(())
</span><span class="cx">         keyfile = os.path.join(PublicKeyLookup_PrivateExchange.directory, self._getSelectorKey())
</span><span class="cx">         if not os.path.exists(keyfile):
</span><del>-            log.debug(&quot;DKIM: Failed private-exchange lookup: no path %s&quot; % (keyfile,))
</del><ins>+            log.debug(&quot;DKIM: Failed private-exchange lookup: no path {path}&quot;, path=keyfile)
</ins><span class="cx">             return succeed(())
</span><span class="cx"> 
</span><span class="cx">         # Now read the data
</span><del>-        log.debug(&quot;DKIM: Private exchange lookup: %s&quot; % (keyfile,))
</del><ins>+        log.debug(&quot;DKIM: Private exchange lookup: {path}&quot;, path=keyfile)
</ins><span class="cx">         try:
</span><span class="cx">             with open(keyfile) as f:
</span><span class="cx">                 keys = f.read()
</span><span class="cx">         except IOError, e:
</span><del>-            log.debug(&quot;DKIM: Failed private-exchange lookup: could not read %s %s&quot; % (keyfile, e,))
</del><ins>+            log.debug(&quot;DKIM: Failed private-exchange lookup: could not read {path} {ex}&quot;, path=keyfile, ex=e)
</ins><span class="cx">             return succeed(())
</span><span class="cx"> 
</span><del>-        log.debug(&quot;DKIM: Private exchange lookup results: %s\n%s&quot; % (keyfile, keys))
</del><ins>+        log.debug(&quot;DKIM: Private exchange lookup results: {path}\n{keys}&quot;, path=keyfile, keys=keys)
</ins><span class="cx">         return succeed(tuple([DKIMUtils.extractTags(line) for line in keys.splitlines()]))
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -985,14 +985,14 @@
</span><span class="cx">             with open(pubkeyfile) as f:
</span><span class="cx">                 key_data = f.read()
</span><span class="cx">         except IOError, e:
</span><del>-            log.error(&quot;DKIM: Unable to open the public key file: %s because of %s&quot; % (pubkeyfile, e,))
</del><ins>+            log.error(&quot;DKIM: Unable to open the public key file: {path} because of {ex}&quot;, path=pubkeyfile, ex=e)
</ins><span class="cx">             raise
</span><span class="cx"> 
</span><span class="cx">         # Make sure we can parse a valid public key
</span><span class="cx">         try:
</span><span class="cx">             RSA.importKey(key_data)
</span><span class="cx">         except:
</span><del>-            log.error(&quot;DKIM: Invalid public key file: %s&quot; % (pubkeyfile,))
</del><ins>+            log.error(&quot;DKIM: Invalid public key file: {path}&quot;, path=pubkeyfile)
</ins><span class="cx">             raise
</span><span class="cx"> 
</span><span class="cx">         # Make the TXT record
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingitippy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/itip.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/itip.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/itip.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -443,7 +443,7 @@
</span><span class="cx">                 if match_component is not None:
</span><span class="cx">                     itip_message.addComponent(match_component)
</span><span class="cx">                 else:
</span><del>-                    log.error(&quot;Ignoring instance: %s missing in iTIP REPLY for: %s&quot; % (rid, itip_message.resourceUID()))
</del><ins>+                    log.error(&quot;Ignoring instance: {rid} missing in iTIP REPLY for: {uid}&quot;, rid=rid, uid=itip_message.resourceUID())
</ins><span class="cx">                     continue
</span><span class="cx"> 
</span><span class="cx">         # Now do all overridden ones (sort by RECURRENCE-ID)
</span><span class="lines">@@ -470,7 +470,7 @@
</span><span class="cx">                 if match_component is not None:
</span><span class="cx">                     calendar.addComponent(match_component)
</span><span class="cx">                 else:
</span><del>-                    log.error(&quot;Ignoring instance: %s in iTIP REPLY for: %s&quot; % (rid, itip_message.resourceUID()))
</del><ins>+                    log.error(&quot;Ignoring instance: {rid} in iTIP REPLY for: {uid}&quot;, rid=rid, uid=itip_message.resourceUID())
</ins><span class="cx">                     continue
</span><span class="cx"> 
</span><span class="cx">             attendee, partstat, private_comment = iTipProcessing.updateAttendeeDataFromReply(itip_component, match_component)
</span><span class="lines">@@ -486,7 +486,7 @@
</span><span class="cx">         elif len_attendees == 1:
</span><span class="cx">             return True, (attendees.pop(), rids)
</span><span class="cx">         else:
</span><del>-            log.error(&quot;ATTENDEE property in a REPLY must be the same in all components\n%s&quot; % (str(itip_message),))
</del><ins>+            log.error(&quot;ATTENDEE property in a REPLY must be the same in all components\n{msg}&quot;, msg=str(itip_message))
</ins><span class="cx">             return False, None
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -521,7 +521,7 @@
</span><span class="cx">         # Get attendee in reply_component - there MUST be only one
</span><span class="cx">         attendees = tuple(reply_component.getRecipientProperties())
</span><span class="cx">         if len(attendees) != 1:
</span><del>-            log.error(&quot;There must be one and only one ATTENDEE property in a REPLY\n%s&quot; % (str(reply_component),))
</del><ins>+            log.error(&quot;There must be one and only one ATTENDEE property in a REPLY\n{msg}&quot;, msg=str(reply_component))
</ins><span class="cx">             return None, False, False
</span><span class="cx"> 
</span><span class="cx">         attendee = attendees[0]
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingprocessingpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/processing.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/processing.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/processing.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -121,21 +121,21 @@
</span><span class="cx">                 # to match that of the organizer assuming we have the organizer's full data available, then
</span><span class="cx">                 # we try the processing operation again.
</span><span class="cx">                 log.failure(&quot;{processor}.doImplicitAttendee()&quot;, processor=self)
</span><del>-                log.error(&quot;ImplicitProcessing - originator '%s' to recipient '%s' with UID: '%s' - exception raised will try to fix: %s&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid, e))
</del><ins>+                log.error(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' with UID: '{uid}' - exception raised will try to fix: {ex}&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid, ex=e)
</ins><span class="cx">                 result = (yield self.doImplicitAttendeeEventFix(e))
</span><span class="cx">                 if result:
</span><del>-                    log.error(&quot;ImplicitProcessing - originator '%s' to recipient '%s' with UID: '%s' - restored organizer's copy&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                    log.error(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' with UID: '{uid}' - restored organizer's copy&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                     try:
</span><span class="cx">                         result = (yield self.doImplicitAttendee())
</span><span class="cx">                     except Exception, e:
</span><span class="cx">                         log.failure(&quot;{processor}.doImplicitAttendee()&quot;, processor=self)
</span><del>-                        log.error(&quot;ImplicitProcessing - originator '%s' to recipient '%s' with UID: '%s' - exception raised after fix: %s&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid, e))
</del><ins>+                        log.error(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' with UID: '{uid}' - exception raised after fix: {ex}&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid, ex=e)
</ins><span class="cx">                         raise ImplicitProcessorException(&quot;5.1;Service unavailable&quot;)
</span><span class="cx">                 else:
</span><del>-                    log.error(&quot;ImplicitProcessing - originator '%s' to recipient '%s' with UID: '%s' - could not fix&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                    log.error(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' with UID: '{uid}' - could not fix&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                     raise ImplicitProcessorException(&quot;5.1;Service unavailable&quot;)
</span><span class="cx">         else:
</span><del>-            log.error(&quot;METHOD:%s not supported for implicit scheduling.&quot; % (self.method,))
</del><ins>+            log.error(&quot;METHOD:{metgod} not supported for implicit scheduling.&quot;, method=self.method)
</ins><span class="cx">             raise ImplicitProcessorException(&quot;3.14;Unsupported capability&quot;)
</span><span class="cx"> 
</span><span class="cx">         returnValue(result)
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">         # Locate the organizer's copy of the event.
</span><span class="cx">         yield self.getRecipientsCopy()
</span><span class="cx">         if self.recipient_calendar is None or self.recipient_in_trash:
</span><del>-            log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' ignoring UID: '%s' - organizer has no copy&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+            log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' ignoring UID: '{uid}' - organizer has no copy&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">             returnValue((True, True, False, None,))
</span><span class="cx"> 
</span><span class="cx">         # Handle new items differently than existing ones.
</span><span class="lines">@@ -209,7 +209,7 @@
</span><span class="cx">             self.recipient_calendar.noInstanceIndexing = True
</span><span class="cx"> 
</span><span class="cx">             # Update the organizer's copy of the event
</span><del>-            log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:REPLY, UID: '%s' - updating event&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+            log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' processing METHOD:REPLY, UID: '{uid}' - updating event&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">             self.organizer_calendar_resource = (yield self.writeCalendarResource(None, self.recipient_calendar_resource, self.recipient_calendar))
</span><span class="cx">             self.organizer_uid = self.organizer_calendar_resource.parentCollection().ownerHome().uid()
</span><span class="cx">             self.organizer_calendar_resource_id = self.organizer_calendar_resource.id()
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx">         @param only_attendees: list of attendees to refresh (C{None} - refresh all)
</span><span class="cx">         @type only_attendees: C{tuple}
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        log.debug(&quot;ImplicitProcessing - refreshing UID: '%s', Attendees: %s&quot; % (self.uid, &quot;, &quot;.join(only_attendees) if only_attendees else &quot;all&quot;))
</del><ins>+        log.debug(&quot;ImplicitProcessing - refreshing UID: '{uid}', Attendees: {att}&quot;, uid=self.uid, att=&quot;, &quot;.join(only_attendees) if only_attendees else &quot;all&quot;)
</ins><span class="cx">         from txdav.caldav.datastore.scheduling.implicit import ImplicitScheduler
</span><span class="cx">         scheduler = ImplicitScheduler()
</span><span class="cx">         yield scheduler.refreshAllAttendeesExceptSome(
</span><span class="lines">@@ -341,7 +341,7 @@
</span><span class="cx">         # If we get a CANCEL and we don't have a matching resource already stored, simply
</span><span class="cx">         # ignore the CANCEL.
</span><span class="cx">         if self.new_resource and self.method == &quot;CANCEL&quot;:
</span><del>-            log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' ignoring METHOD:CANCEL, UID: '%s' - attendee has no copy&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+            log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' ignoring METHOD:CANCEL, UID: '{uid}' - attendee has no copy&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">             result = (True, True, False, None)
</span><span class="cx">         else:
</span><span class="cx">             result = (yield self.doImplicitAttendeeUpdate())
</span><span class="lines">@@ -366,7 +366,7 @@
</span><span class="cx">                 # Additional check - if the existing organizer is missing and the originator
</span><span class="cx">                 # is local to the server - then allow the change
</span><span class="cx">                 if not (existing_organizer == &quot;&quot; and self.originator.hosted()):
</span><del>-                    log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' ignoring UID: '%s' - organizer has no copy&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                    log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' ignoring UID: '{uid}' - organizer has no copy&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                     # If the recipient copy is in the trash, just remove it
</span><span class="cx">                     if self.recipient_in_trash:
</span><span class="cx">                         yield self.deleteCalendarResource(self.recipient_calendar_resource)
</span><span class="lines">@@ -400,7 +400,7 @@
</span><span class="cx">         if self.message.hasProperty(&quot;X-CALENDARSERVER-SPLIT-OLDER-UID&quot;):
</span><span class="cx">             if config.Scheduling.Options.Splitting.Enabled:
</span><span class="cx">                 # Tell the existing resource to split
</span><del>-                log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' splitting UID: '%s'&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' splitting UID: '{uid}'&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                 split = (yield self.doImplicitAttendeeSplit())
</span><span class="cx">                 if split:
</span><span class="cx">                     returnValue((True, False, False, None,))
</span><span class="lines">@@ -410,7 +410,7 @@
</span><span class="cx"> 
</span><span class="cx">         elif self.message.hasProperty(&quot;X-CALENDARSERVER-SPLIT-NEWER-UID&quot;):
</span><span class="cx">             if config.Scheduling.Options.Splitting.Enabled:
</span><del>-                log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' ignoring UID: '%s' - split already done&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' ignoring UID: '{uid}' - split already done&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                 returnValue((True, False, False, None,))
</span><span class="cx">             else:
</span><span class="cx">                 self.message.removeProperty(&quot;X-CALENDARSERVER-SPLIT-NEWER-UID&quot;)
</span><span class="lines">@@ -479,16 +479,16 @@
</span><span class="cx">             # Check if the incoming data has the recipient declined in all instances. In that case we will not create
</span><span class="cx">             # a new resource as chances are the recipient previously deleted the resource and we want to keep it deleted.
</span><span class="cx">             if all_declined:
</span><del>-                log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:REQUEST, UID: '%s' - ignoring all declined&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' processing METHOD:REQUEST, UID: '{uid}' - ignoring all declined&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                 returnValue((True, False, False, None,))
</span><span class="cx"> 
</span><span class="cx">             # Check for default calendar
</span><span class="cx">             default = (yield self.recipient.inbox.viewerHome().defaultCalendar(self.message.mainType()))
</span><span class="cx">             if default is None:
</span><del>-                log.error(&quot;No default calendar for recipient: '%s'.&quot; % (self.recipient.cuaddr,))
</del><ins>+                log.error(&quot;No default calendar for recipient: '{recip}'.&quot;, recip=self.recipient.cuaddr)
</ins><span class="cx">                 raise ImplicitProcessorException(iTIPRequestStatus.NO_USER_SUPPORT)
</span><span class="cx"> 
</span><del>-            log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:REQUEST, UID: '%s' - new processed&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+            log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' processing METHOD:REQUEST, UID: '{uid}' - new processed&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">             new_calendar = iTipProcessing.processNewRequest(self.message, self.recipient.cuaddr, creating=True)
</span><span class="cx"> 
</span><span class="cx">             # Handle auto-reply behavior
</span><span class="lines">@@ -516,7 +516,7 @@
</span><span class="cx"> 
</span><span class="cx">             if send_reply:
</span><span class="cx">                 # Track outstanding auto-reply processing
</span><del>-                log.debug(&quot;ImplicitProcessing - recipient '%s' processing UID: '%s' - auto-reply queued&quot; % (self.recipient.cuaddr, self.uid,))
</del><ins>+                log.debug(&quot;ImplicitProcessing - recipient '{recip}' processing UID: '{uid}' - auto-reply queued&quot;, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                 yield ScheduleAutoReplyWork.autoReply(self.txn, new_resource, partstat)
</span><span class="cx"> 
</span><span class="cx">             # Build the schedule-changes XML element
</span><span class="lines">@@ -560,13 +560,13 @@
</span><span class="cx">                     new_calendar.noInstanceIndexing = not send_reply
</span><span class="cx"> 
</span><span class="cx">                 # Update the attendee's copy of the event
</span><del>-                log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:REQUEST, UID: '%s' - updating event&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' processing METHOD:REQUEST, UID: '{uid}' - updating event&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx"> 
</span><span class="cx">                 new_resource = (yield self.writeCalendarResource(None, self.recipient_calendar_resource, new_calendar))
</span><span class="cx"> 
</span><span class="cx">                 if send_reply:
</span><span class="cx">                     # Track outstanding auto-reply processing
</span><del>-                    log.debug(&quot;ImplicitProcessing - recipient '%s' processing UID: '%s' - auto-reply queued&quot; % (self.recipient.cuaddr, self.uid,))
</del><ins>+                    log.debug(&quot;ImplicitProcessing - recipient '{recip}' processing UID: '{uid}' - auto-reply queued&quot;, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                     yield ScheduleAutoReplyWork.autoReply(self.txn, new_resource, partstat)
</span><span class="cx"> 
</span><span class="cx">                 # Build the schedule-changes XML element
</span><span class="lines">@@ -604,7 +604,7 @@
</span><span class="cx"> 
</span><span class="cx">             else:
</span><span class="cx">                 # Request needs to be ignored
</span><del>-                log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:REQUEST, UID: '%s' - ignoring&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' processing METHOD:REQUEST, UID: '{uid}' - ignoring&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                 result = (True, False, False, None,)
</span><span class="cx"> 
</span><span class="cx">         returnValue(result)
</span><span class="lines">@@ -627,7 +627,7 @@
</span><span class="cx">         # the cancelled meeting.
</span><span class="cx">         if self.recipient_in_trash:
</span><span class="cx">             # Note we should never get here as this test is
</span><del>-            log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' ignoring METHOD:CANCEL, UID: '%s' - attendee copy in trash&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+            log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' ignoring METHOD:CANCEL, UID: '{uid}' - attendee copy in trash&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">             yield self.deleteCalendarResource(self.recipient_calendar_resource)
</span><span class="cx">             result = (True, True, False, None)
</span><span class="cx">         else:
</span><span class="lines">@@ -658,7 +658,7 @@
</span><span class="cx">                 if delete_original:
</span><span class="cx"> 
</span><span class="cx">                     # Delete the attendee's copy of the event
</span><del>-                    log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:CANCEL, UID: '%s' - deleting entire event&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                    log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' processing METHOD:CANCEL, UID: '{uid}' - deleting entire event&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                     yield self.deleteCalendarResource(self.recipient_calendar_resource)
</span><span class="cx"> 
</span><span class="cx">                     # Build the schedule-changes XML element
</span><span class="lines">@@ -673,7 +673,7 @@
</span><span class="cx">                 else:
</span><span class="cx"> 
</span><span class="cx">                     # Update the attendee's copy of the event
</span><del>-                    log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:CANCEL, UID: '%s' - updating event&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                    log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' processing METHOD:CANCEL, UID: '{uid}' - updating event&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                     yield self.writeCalendarResource(None, self.recipient_calendar_resource, self.recipient_calendar)
</span><span class="cx"> 
</span><span class="cx">                     # Build the schedule-changes XML element
</span><span class="lines">@@ -689,7 +689,7 @@
</span><span class="cx">                     )
</span><span class="cx">                     result = (True, autoprocessed, store_inbox, changes)
</span><span class="cx">             else:
</span><del>-                log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:CANCEL, UID: '%s' - ignoring&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+                log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' processing METHOD:CANCEL, UID: '{uid}' - ignoring&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">                 result = (True, False, False, None)
</span><span class="cx"> 
</span><span class="cx">         returnValue(result)
</span><span class="lines">@@ -703,7 +703,7 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         # If there is no existing copy, then we must fail
</span><span class="cx">         if self.new_resource:
</span><del>-            log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:POLLSTATUS, UID: '%s' - attendee has no copy&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+            log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' processing METHOD:POLLSTATUS, UID: '{uid}' - attendee has no copy&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">             returnValue((True, False, False, None,))
</span><span class="cx"> 
</span><span class="cx">         processed_message = iTipProcessing.processPollStatus(self.message, self.recipient_calendar)
</span><span class="lines">@@ -713,7 +713,7 @@
</span><span class="cx">         processed_message.noInstanceIndexing = True
</span><span class="cx"> 
</span><span class="cx">         # Update the attendee's copy of the event
</span><del>-        log.debug(&quot;ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:POLLSTATUS, UID: '%s' - updating poll&quot; % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
</del><ins>+        log.debug(&quot;ImplicitProcessing - originator '{orig}' to recipient '{recip}' processing METHOD:POLLSTATUS, UID: '{uid}' - updating poll&quot;, orig=self.originator.cuaddr, recip=self.recipient.cuaddr, uid=self.uid)
</ins><span class="cx">         yield self.writeCalendarResource(None, self.recipient_calendar_resource, processed_message)
</span><span class="cx"> 
</span><span class="cx">         returnValue((True, False, False, None,))
</span><span class="lines">@@ -762,8 +762,8 @@
</span><span class="cx">                 AutoScheduleMode.acceptIfFreeDeclineIfBusy
</span><span class="cx">             )
</span><span class="cx"> 
</span><del>-        log.debug(&quot;ImplicitProcessing - recipient '%s' processing UID: '%s' - checking for auto-reply with mode: %s&quot; % (self.recipient.cuaddr, self.uid, automode.name,))
</del><span class="cx"> 
</span><ins>+        log.debug(&quot;ImplicitProcessing - recipient '{recip}' processing UID: '{uid}' - checking for auto-reply with mode: {mode}&quot;, recip=self.recipient.cuaddr, uid=self.uid, mode=automode.name)
</ins><span class="cx">         cuas = self.recipient.record.calendarUserAddresses
</span><span class="cx"> 
</span><span class="cx">         # First expand current one to get instances (only go 1 year into the future)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingutilspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/utils.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/utils.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/utils.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> 
</span><span class="cx">         if len(objectResources) &gt; 1:
</span><span class="cx">             # Delete all but the first one
</span><del>-            log.debug(&quot;Should only have zero or one scheduling object resource with UID '%s' in calendar home: %s&quot; % (uid, calendar_home,))
</del><ins>+            log.debug(&quot;Should only have zero or one scheduling object resource with UID '{uid}' in calendar home: {home!r}&quot;, uid=uid, home=calendar_home)
</ins><span class="cx">             for resource in objectResources[1:]:
</span><span class="cx">                 yield resource._removeInternal(internal_state=ComponentRemoveState.INTERNAL, useTrash=False)
</span><span class="cx">             objectResources = objectResources[:1]
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreschedulingworkpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/work.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/work.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/scheduling/work.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -698,7 +698,7 @@
</span><span class="cx">         scheduler = CalDAVScheduler(self.transaction, home.uid())
</span><span class="cx"> 
</span><span class="cx">         # Do the PUT processing
</span><del>-        log.info(&quot;Implicit REPLY - attendee: '%s' to organizer: '%s', UID: '%s'&quot; % (originator, recipient, itipmsg.resourceUID(),))
</del><ins>+        log.info(&quot;Implicit REPLY - attendee: '{att}' to organizer: '{org}', UID: '{uid}'&quot;, att=originator, org=recipient, uid=itipmsg.resourceUID())
</ins><span class="cx">         response = (yield scheduler.doSchedulingViaPUT(originator, (recipient,), itipmsg, internal_request=True))
</span><span class="cx">         returnValue(response)
</span><span class="cx"> 
</span><span class="lines">@@ -1095,15 +1095,15 @@
</span><span class="cx">                 yield NamedLock.acquire(self.transaction, &quot;ImplicitUIDLock:%s&quot; % (hashlib.md5(resource.uid()).hexdigest(),))
</span><span class="cx"> 
</span><span class="cx">                 # Send out a reply
</span><del>-                log.debug(&quot;ImplicitProcessing - recipient '%s' processing UID: '%s' - auto-reply: %s&quot; % (home.uid(), resource.uid(), self.partstat))
</del><ins>+                log.debug(&quot;ImplicitProcessing - recipient '{recip}' processing UID: '{uid}' - auto-reply: {partstat}&quot;, recip=home.uid(), uid=resource.uid(), partstat=self.partstat)
</ins><span class="cx">                 from txdav.caldav.datastore.scheduling.implicit import ImplicitScheduler
</span><span class="cx">                 scheduler = ImplicitScheduler()
</span><span class="cx">                 yield scheduler.sendAttendeeReply(self.transaction, resource)
</span><span class="cx">             except Exception, e:
</span><del>-                log.debug(&quot;ImplicitProcessing - auto-reply exception UID: '%s', %s&quot; % (resource.uid(), str(e)))
</del><ins>+                log.debug(&quot;ImplicitProcessing - auto-reply exception UID: '{uid}', {ex}&quot;, uid=resource.uid(), ex=str(e))
</ins><span class="cx">                 raise
</span><span class="cx">             except:
</span><del>-                log.debug(&quot;ImplicitProcessing - auto-reply bare exception UID: '%s'&quot; % (resource.uid(),))
</del><ins>+                log.debug(&quot;ImplicitProcessing - auto-reply bare exception UID: '{uid}'&quot;, uid=resource.uid())
</ins><span class="cx">                 raise
</span><span class="cx">         else:
</span><span class="cx">             log.debug(&quot;ImplicitProcessing - skipping auto-reply of missing ID: '{rid}'&quot;, rid=self.resourceID)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoresqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/sql.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/sql.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/sql.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -196,9 +196,9 @@
</span><span class="cx">             ).on(txn))
</span><span class="cx">             total = len(rows)
</span><span class="cx">             count = 0
</span><del>-            log.warn(&quot;{0} dropbox ids to migrate&quot;.format(total,))
</del><ins>+            log.warn(&quot;{total} dropbox ids to migrate&quot;, total=total)
</ins><span class="cx">         except RuntimeError, e:
</span><del>-            log.error(&quot;Dropbox migration failed when cleaning out dropbox ids: {0}&quot;.format(e,))
</del><ins>+            log.error(&quot;Dropbox migration failed when cleaning out dropbox ids: {ex}&quot;, ex=e)
</ins><span class="cx">             yield txn.abort()
</span><span class="cx">             raise
</span><span class="cx">         else:
</span><span class="lines">@@ -221,9 +221,9 @@
</span><span class="cx">                     for dropbox_id in rows:
</span><span class="cx">                         (yield self._upgradeDropbox(txn, dropbox_id))
</span><span class="cx">                     count += len(rows)
</span><del>-                    log.warn(&quot;{0} of {1} dropbox ids migrated&quot;.format(count, total,))
</del><ins>+                    log.warn(&quot;{count} of {total} dropbox ids migrated&quot;, count=count, total=total)
</ins><span class="cx">             except RuntimeError, e:
</span><del>-                log.error(&quot;Dropbox migration failed for '{0}': {1}&quot;.format(dropbox_id, e,))
</del><ins>+                log.error(&quot;Dropbox migration failed for '{id}': {ex}&quot;, id=dropbox_id, ex=e)
</ins><span class="cx">                 yield txn.abort()
</span><span class="cx">                 raise
</span><span class="cx">             else:
</span><span class="lines">@@ -243,11 +243,11 @@
</span><span class="cx">         @type dropbox_id: C{str}
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-        log.debug(&quot;Processing dropbox id: {0}&quot;.format(dropbox_id,))
</del><ins>+        log.debug(&quot;Processing dropbox id: {id}&quot;, id=dropbox_id)
</ins><span class="cx"> 
</span><span class="cx">         # Get all affected calendar objects
</span><span class="cx">         cobjs = (yield self._loadCalendarObjectsForDropboxID(txn, dropbox_id))
</span><del>-        log.debug(&quot;  {0} affected calendar objects&quot;.format(len(cobjs),))
</del><ins>+        log.debug(&quot;  {len} affected calendar objects&quot;, len=len(cobjs))
</ins><span class="cx"> 
</span><span class="cx">         # Get names of each matching attachment
</span><span class="cx">         at = Attachment._attachmentSchema
</span><span class="lines">@@ -256,18 +256,18 @@
</span><span class="cx">             From=at,
</span><span class="cx">             Where=at.DROPBOX_ID == dropbox_id,
</span><span class="cx">         ).on(txn))
</span><del>-        log.debug(&quot;  {0} associated attachment objects&quot;.format(len(names),))
</del><ins>+        log.debug(&quot;  {len} associated attachment objects&quot;, len=len(names))
</ins><span class="cx"> 
</span><span class="cx">         # For each attachment, update each calendar object
</span><span class="cx">         for name in names:
</span><span class="cx">             name = name[0]
</span><del>-            log.debug(&quot;  processing attachment object: {0}&quot;.format(name,))
</del><ins>+            log.debug(&quot;  processing attachment object: {name}&quot;, name=name)
</ins><span class="cx">             attachment = (yield DropBoxAttachment.load(txn, dropbox_id, name))
</span><span class="cx"> 
</span><span class="cx">             # Check for orphans
</span><span class="cx">             if len(cobjs) == 0:
</span><span class="cx">                 # Just remove the attachment
</span><del>-                log.warn(&quot;Orphaned dropbox id removed: {0}&quot;.format(attachment._path,))
</del><ins>+                log.warn(&quot;Orphaned dropbox id removed: {path}&quot;, path=attachment._path)
</ins><span class="cx">                 yield attachment.remove()
</span><span class="cx">                 continue
</span><span class="cx"> 
</span><span class="lines">@@ -278,35 +278,35 @@
</span><span class="cx">                 if cobj._parentCollection.ownerHome()._resourceID == attachment._ownerHomeID:
</span><span class="cx">                     owners.append(cobj)
</span><span class="cx">                 cobj_by_UID[cobj.uid()].append(cobj)
</span><del>-            log.debug(&quot;    {0} owner calendar objects&quot;.format(len(owners),))
-            log.debug(&quot;    {0} UIDs&quot;.format(len(cobj_by_UID),))
-            log.debug(&quot;    {0} total calendar objects&quot;.format(sum([len(items) for items in cobj_by_UID.values()]),))
</del><ins>+            log.debug(&quot;    {len} owner calendar objects&quot;, len=len(owners))
+            log.debug(&quot;    {len} UIDs&quot;, len=len(cobj_by_UID))
+            log.debug(&quot;    {len} total calendar objects&quot;, len=sum([len(items) for items in cobj_by_UID.values()]))
</ins><span class="cx"> 
</span><span class="cx">             if owners:
</span><span class="cx">                 # Create the managed attachment without references to calendar objects.
</span><span class="cx">                 managed = (yield attachment.convertToManaged())
</span><del>-                log.debug(&quot;    converted attachment: {0!r}&quot;.format(attachment,))
</del><ins>+                log.debug(&quot;    converted attachment: {att!r}&quot;, att=attachment)
</ins><span class="cx"> 
</span><span class="cx">                 # Do conversion for each owner object
</span><span class="cx">                 for owner_obj in owners:
</span><span class="cx"> 
</span><span class="cx">                     # Add a reference to the managed attachment
</span><span class="cx">                     mattachment = (yield managed.newReference(owner_obj._resourceID))
</span><del>-                    log.debug(&quot;    added reference for: {0!r}&quot;.format(owner_obj,))
</del><ins>+                    log.debug(&quot;    added reference for: {owner!r}&quot;, owner=owner_obj)
</ins><span class="cx"> 
</span><span class="cx">                     # Rewrite calendar data
</span><span class="cx">                     for cobj in cobj_by_UID[owner_obj.uid()]:
</span><span class="cx">                         (yield cobj.convertAttachments(attachment, mattachment))
</span><del>-                        log.debug(&quot;    re-wrote calendar object: {0!r}&quot;.format(cobj,))
</del><ins>+                        log.debug(&quot;    re-wrote calendar object: {owner!r}&quot;, owner=cobj)
</ins><span class="cx">             else:
</span><span class="cx">                 # TODO: look for cobjs that were not changed and remove their ATTACH properties.
</span><span class="cx">                 # These could happen if the owner object no longer exists.
</span><span class="cx">                 # For now just remove the attachment
</span><del>-                log.warn(&quot;Unowned dropbox id removed: {0}&quot;.format(attachment._path,))
</del><ins>+                log.warn(&quot;Unowned dropbox id removed: {path}&quot;, path=attachment._path)
</ins><span class="cx">                 yield attachment.remove()
</span><span class="cx">                 continue
</span><span class="cx"> 
</span><del>-        log.debug(&quot;  finished dropbox id: {0}&quot;.format(dropbox_id,))
</del><ins>+        log.debug(&quot;  finished dropbox id: {id}&quot;, id=dropbox_id)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="lines">@@ -805,7 +805,7 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><span class="cx">         # Make sure the loop does not operate on any new calendars created during the loop
</span><del>-        self.log.warn(&quot;Splitting calendars for user {0}&quot;.format(self._ownerUID,))
</del><ins>+        self.log.warn(&quot;Splitting calendars for user {uid}&quot;, uid=self._ownerUID)
</ins><span class="cx">         calendars = yield self.calendars()
</span><span class="cx">         for calendar in calendars:
</span><span class="cx"> 
</span><span class="lines">@@ -816,7 +816,7 @@
</span><span class="cx">             if calendar.isTrash():
</span><span class="cx">                 continue
</span><span class="cx">             split_count = yield calendar.splitCollectionByComponentTypes()
</span><del>-            self.log.warn(&quot;  Calendar: '{0}', split into {1}&quot;.format(calendar.name(), split_count + 1,))
</del><ins>+            self.log.warn(&quot;  Calendar: '{name}', split into {count}&quot;, name=calendar.name(), count=split_count + 1)
</ins><span class="cx"> 
</span><span class="cx">         yield self.ensureDefaultCalendarsExist()
</span><span class="cx"> 
</span><span class="lines">@@ -1927,7 +1927,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Actually expand recurrence max
</span><span class="cx">         for name in names:
</span><del>-            self.log.info(&quot;Search falls outside range of index for {0} {1} to {2}&quot;.format(name, minDate, maxDate))
</del><ins>+            self.log.info(&quot;Search falls outside range of index for {name} {min} to {max}&quot;, name=name, min=minDate, max=maxDate)
</ins><span class="cx">             yield self.reExpandResource(name, minDate, maxDate)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -4016,8 +4016,9 @@
</span><span class="cx">                 recurrenceLimit = instances.limit
</span><span class="cx">                 recurrenceLowerLimit = instances.lowerLimit
</span><span class="cx">             except InvalidOverriddenInstanceError, e:
</span><del>-                self.log.error(&quot;Invalid instance {0} when indexing {1} in {2}&quot;.format(
-                    e.rid, self._name, self._calendar,)
</del><ins>+                self.log.error(
+                    &quot;Invalid instance {rid} when indexing {name} in {cal!r}&quot;,
+                    rid=e.rid, name=self._name, cal=self._calendar,
</ins><span class="cx">                 )
</span><span class="cx"> 
</span><span class="cx">                 if txn._migrating:
</span><span class="lines">@@ -4293,16 +4294,14 @@
</span><span class="cx"> 
</span><span class="cx">             if unfixed:
</span><span class="cx">                 self.log.error(
</span><del>-                    &quot;Calendar data id={0} had unfixable problems:\n  {1}&quot;.format(
-                        self._resourceID, &quot;\n  &quot;.join(unfixed),
-                    )
</del><ins>+                    &quot;Calendar data id={id} had unfixable problems:\n  {problems}&quot;,
+                    id=self._resourceID, problems=&quot;\n  &quot;.join(unfixed),
</ins><span class="cx">                 )
</span><span class="cx"> 
</span><span class="cx">             if fixed:
</span><span class="cx">                 self.log.error(
</span><del>-                    &quot;Calendar data id={0} had fixable problems:\n  {1}&quot;.format(
-                        self._resourceID, &quot;\n  &quot;.join(fixed),
-                    )
</del><ins>+                    &quot;Calendar data id={id} had fixable problems:\n  {problems}&quot;,
+                    id=self._resourceID, problems=&quot;\n  &quot;.join(fixed),
</ins><span class="cx">                 )
</span><span class="cx"> 
</span><span class="cx">             # Check for on-demand data upgrade
</span><span class="lines">@@ -4850,7 +4849,7 @@
</span><span class="cx">             t = attachment.store(content_type, filename)
</span><span class="cx">             yield readStream(stream, t.write)
</span><span class="cx">         except Exception, e:
</span><del>-            self.log.error(&quot;Unable to store attachment: {0}&quot;.format(e,))
</del><ins>+            self.log.error(&quot;Unable to store attachment: {ex}&quot;, ex=e)
</ins><span class="cx">             raise AttachmentStoreFailed
</span><span class="cx">         yield t.loseConnection()
</span><span class="cx"> 
</span><span class="lines">@@ -4908,7 +4907,7 @@
</span><span class="cx">             # Check that this is a proper update
</span><span class="cx">             oldattachment = (yield self.attachmentWithManagedID(managed_id))
</span><span class="cx">             if oldattachment is None:
</span><del>-                self.log.error(&quot;Missing managed attachment even though ATTACHMENT_CALENDAR_OBJECT indicates it is present: {0}&quot;.format(managed_id,))
</del><ins>+                self.log.error(&quot;Missing managed attachment even though ATTACHMENT_CALENDAR_OBJECT indicates it is present: {mid}&quot;, mid=managed_id)
</ins><span class="cx">                 raise AttachmentStoreFailed
</span><span class="cx"> 
</span><span class="cx">             # We actually create a brand new attachment object for the update, but with the same managed-id. That way, other resources
</span><span class="lines">@@ -4917,7 +4916,7 @@
</span><span class="cx">             t = attachment.store(content_type, filename)
</span><span class="cx">             yield readStream(stream, t.write)
</span><span class="cx">         except Exception, e:
</span><del>-            self.log.error(&quot;Unable to store attachment: {0}&quot;.format(e,))
</del><ins>+            self.log.error(&quot;Unable to store attachment: {ex}&quot;, ex=e)
</ins><span class="cx">             raise AttachmentStoreFailed
</span><span class="cx">         yield t.loseConnection()
</span><span class="cx"> 
</span><span class="lines">@@ -5266,7 +5265,7 @@
</span><span class="cx">         except (ObjectResourceNameAlreadyExistsError, UIDExistsError, UIDExistsElsewhereError):
</span><span class="cx">             raise InvalidSplit(&quot;Chosen UID exists elsewhere.&quot;)
</span><span class="cx">         except Exception as e:
</span><del>-            log.error(&quot;Unknown split exception: {}&quot;.format(str(e)))
</del><ins>+            log.error(&quot;Unknown split exception: {ex}&quot;, ex=str(e))
</ins><span class="cx">             raise InvalidSplit(&quot;Unknown error.&quot;)
</span><span class="cx">         returnValue(olderObject)
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoretesttest_implicitpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/test/test_implicit.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/test/test_implicit.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/test/test_implicit.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -1274,3 +1274,5 @@
</span><span class="cx">         cobjs = (yield calendar2.calendarObjects())
</span><span class="cx">         self.assertTrue(len(cobjs) == 0)
</span><span class="cx">         yield self.commit()
</span><ins>+
+        self.flushLoggedErrors(ValueError)
</ins></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoretesttest_sqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/test/test_sql.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/test/test_sql.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/test/test_sql.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -1022,7 +1022,9 @@
</span><span class="cx">         yield d1
</span><span class="cx">         yield d2
</span><span class="cx"> 
</span><ins>+        self.flushLoggedErrors()
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_transferSharingDetails(self):
</span><span class="cx">         &quot;&quot;&quot;
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcaldavdatastoreutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/util.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/util.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/caldav/datastore/util.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx">     try:
</span><span class="cx">         record = yield recordFunction(cuaddr)
</span><span class="cx">     except Exception, e:
</span><del>-        log.debug(&quot;Lookup of %s failed: %s&quot; % (cuaddr, e))
</del><ins>+        log.debug(&quot;Lookup of {cuaddr} failed: {ex}&quot;, cuaddr=cuaddr, ex=e)
</ins><span class="cx">         record = None
</span><span class="cx"> 
</span><span class="cx">     if record is None:
</span><span class="lines">@@ -204,18 +204,21 @@
</span><span class="cx">         try:
</span><span class="cx">             ctype = yield calendarObject.componentType()
</span><span class="cx">         except Exception, e: # Don't stop for any error
</span><del>-            log.error(&quot;  Failed to migrate calendar object: %s/%s/%s (%s)&quot; % (
-                inCalendar.ownerHome().name(),
-                inCalendar.name(),
-                calendarObject.name(),
-                str(e)
-            ))
</del><ins>+            log.error(
+                &quot;  Failed to migrate calendar object: {home}/{cal}/{rsrc} (ex)&quot;,
+                home=inCalendar.ownerHome().name(),
+                cal=inCalendar.name(),
+                rsrc=calendarObject.name(),
+                ex=str(e),
+            )
</ins><span class="cx">             bad_count += 1
</span><span class="cx">             continue
</span><span class="cx"> 
</span><span class="cx">         if ctype not in (&quot;VEVENT&quot;, &quot;VTODO&quot;):
</span><del>-            log.error(&quot;Migration skipping unsupported (%s) calendar object %r&quot;
-                      % (ctype, calendarObject))
</del><ins>+            log.error(
+                &quot;Migration skipping unsupported ({ctype}) calendar object {obj!r}&quot;,
+                ctype=ctype, obj=calendarObject,
+            )
</ins><span class="cx">             continue
</span><span class="cx">         if merge:
</span><span class="cx">             mightConflict = yield outHome.hasCalendarResourceUIDSomewhereElse(
</span><span class="lines">@@ -223,8 +226,8 @@
</span><span class="cx">             )
</span><span class="cx">             if mightConflict is not None:
</span><span class="cx">                 log.warn(
</span><del>-                    &quot;Not migrating object %s/%s/%s due to potential conflict&quot; %
-                    (outHome.uid(), outCalendar.name(), calendarObject.name())
</del><ins>+                    &quot;Not migrating object {home}/{cal}/{rsrc} due to potential conflict&quot;,
+                    home=outHome.uid(), cal=outCalendar.name(), rsrc=calendarObject.name(),
</ins><span class="cx">                 )
</span><span class="cx">                 continue
</span><span class="cx">         try:
</span><span class="lines">@@ -264,20 +267,22 @@
</span><span class="cx">             ok_count += 1
</span><span class="cx"> 
</span><span class="cx">         except InternalDataStoreError:
</span><del>-            log.error(&quot;  InternalDataStoreError: Failed to migrate calendar object: %s/%s/%s&quot; % (
-                inCalendar.ownerHome().name(),
-                inCalendar.name(),
-                calendarObject.name(),
-            ))
</del><ins>+            log.error(
+                &quot;  InternalDataStoreError: Failed to migrate calendar object: {home}/{cal}/{rsrc}&quot;,
+                home=inCalendar.ownerHome().name(),
+                cal=inCalendar.name(),
+                rsrc=calendarObject.name(),
+            )
</ins><span class="cx">             bad_count += 1
</span><span class="cx"> 
</span><span class="cx">         except Exception, e:
</span><del>-            log.error(&quot;  %s: Failed to migrate calendar object: %s/%s/%s&quot; % (
-                str(e),
-                inCalendar.ownerHome().name(),
-                inCalendar.name(),
-                calendarObject.name(),
-            ))
</del><ins>+            log.error(
+                &quot;  {ex}: Failed to migrate calendar object: {home}/{cal}/{rsrc}&quot;,
+                ex=str(e),
+                home=inCalendar.ownerHome().name(),
+                cal=inCalendar.name(),
+                rsrc=calendarObject.name(),
+            )
</ins><span class="cx">             bad_count += 1
</span><span class="cx"> 
</span><span class="cx">     returnValue((ok_count, bad_count,))
</span><span class="lines">@@ -404,7 +409,7 @@
</span><span class="cx">             yield _migrateCalendar(calendar, outCalendar, getComponent, merge=merge)
</span><span class="cx">         except InternalDataStoreError:
</span><span class="cx">             log.error(
</span><del>-                &quot;  Failed to migrate calendar: %s/%s&quot; % (inHome.name(), name,)
</del><ins>+                &quot;  Failed to migrate calendar: {home}/{cal}&quot;, home=inHome.name(), cal=name,
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">     # No migration for notifications, since they weren't present in earlier
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcarddavdatastorefilepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/file.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/file.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/file.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -239,10 +239,10 @@
</span><span class="cx">         fixed, unfixed = component.validVCardData(doFix=True, doRaise=False)
</span><span class="cx"> 
</span><span class="cx">         if unfixed:
</span><del>-            self.log.error(&quot;Address data at %s had unfixable problems:\n  %s&quot; % (self._path.path, &quot;\n  &quot;.join(unfixed),))
</del><ins>+            self.log.error(&quot;Address data at {path} had unfixable problems:\n  {problems}&quot;, path=self._path.path, problems=&quot;\n  &quot;.join(unfixed))
</ins><span class="cx"> 
</span><span class="cx">         if fixed:
</span><del>-            self.log.error(&quot;Address data at %s had fixable problems:\n  %s&quot; % (self._path.path, &quot;\n  &quot;.join(fixed),))
</del><ins>+            self.log.error(&quot;Address data at {path} had fixable problems:\n  {problems}&quot;, path=self._path.path, problems=&quot;\n  &quot;.join(fixed))
</ins><span class="cx"> 
</span><span class="cx">         return component
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcarddavdatastoreindex_filepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/index_file.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/index_file.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/index_file.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -80,10 +80,10 @@
</span><span class="cx"> 
</span><span class="cx">     def reserveUID(self, uid):
</span><span class="cx">         uid = uid.encode('utf-8')
</span><del>-        self.log.debug(&quot;Reserving UID %r @ %r&quot; % (
-            uid,
-            self.index.resource.fp.path
-        ))
</del><ins>+        self.log.debug(
+            &quot;Reserving UID {uid} @ {path}&quot;,
+            uid=uid, path=self.index.resource.fp.path,
+        )
</ins><span class="cx"> 
</span><span class="cx">         def _handleFalse(result):
</span><span class="cx">             if result is False:
</span><span class="lines">@@ -101,10 +101,10 @@
</span><span class="cx"> 
</span><span class="cx">     def unreserveUID(self, uid):
</span><span class="cx">         uid = uid.encode('utf-8')
</span><del>-        self.log.debug(&quot;Unreserving UID %r @ %r&quot; % (
-            uid,
-            self.index.resource.fp.path
-        ))
</del><ins>+        self.log.debug(
+            &quot;Unreserving UID {uid} @ {path}&quot;,
+            uid=uid, path=self.index.resource.fp.path,
+        )
</ins><span class="cx"> 
</span><span class="cx">         def _handleFalse(result):
</span><span class="cx">             if result is False:
</span><span class="lines">@@ -120,10 +120,10 @@
</span><span class="cx"> 
</span><span class="cx">     def isReservedUID(self, uid):
</span><span class="cx">         uid = uid.encode('utf-8')
</span><del>-        self.log.debug(&quot;Is reserved UID %r @ %r&quot; % (
-            uid,
-            self.index.resource.fp.path
-        ))
</del><ins>+        self.log.debug(
+            &quot;Is reserved UID {uid} @ {path}&quot;,
+            uid=uid, path=self.index.resource.fp.path,
+        )
</ins><span class="cx"> 
</span><span class="cx">         def _checkValue((flags, value)):
</span><span class="cx">             if value is None:
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">                 % (uid, self.index.resource)
</span><span class="cx">             )
</span><span class="cx">         except sqlite.Error, e:
</span><del>-            log.error(&quot;Unable to reserve UID: %s&quot;, (e,))
</del><ins>+            log.error(&quot;Unable to reserve UID: {ex}&quot;, ex=e)
</ins><span class="cx">             self.index._db_rollback()
</span><span class="cx">             raise
</span><span class="cx"> 
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx">                         &quot;delete from RESERVED where UID = :1&quot;, uid)
</span><span class="cx">                     self.index._db_commit()
</span><span class="cx">                 except sqlite.Error, e:
</span><del>-                    log.error(&quot;Unable to unreserve UID: %s&quot;, (e,))
</del><ins>+                    log.error(&quot;Unable to unreserve UID: {ex}&quot;, ex=e)
</ins><span class="cx">                     self.index._db_rollback()
</span><span class="cx">                     raise
</span><span class="cx"> 
</span><span class="lines">@@ -212,7 +212,7 @@
</span><span class="cx">                     self.index._db_execute(&quot;delete from RESERVED where UID = :1&quot;, uid)
</span><span class="cx">                     self.index._db_commit()
</span><span class="cx">                 except sqlite.Error, e:
</span><del>-                    log.error(&quot;Unable to unreserve UID: %s&quot;, (e,))
</del><ins>+                    log.error(&quot;Unable to unreserve UID: {ex}&quot;, ex=e)
</ins><span class="cx">                     self.index._db_rollback()
</span><span class="cx">                     raise
</span><span class="cx">                 return False
</span><span class="lines">@@ -336,7 +336,7 @@
</span><span class="cx">             name_utf8 = name.encode(&quot;utf-8&quot;)
</span><span class="cx">             if name is not None and self.resource.getChild(name_utf8) is None:
</span><span class="cx">                 # Clean up
</span><del>-                log.error(&quot;Stale resource record found for child %s with UID %s in %s&quot; % (name, uid, self.resource))
</del><ins>+                log.error(&quot;Stale resource record found for child {name} with UID {uid} in {rsrc!r}&quot;, name=name, uid=uid, rsrc=self.resource)
</ins><span class="cx">                 self._delete_from_db(name, uid, False)
</span><span class="cx">                 self._db_commit()
</span><span class="cx">             else:
</span><span class="lines">@@ -507,8 +507,10 @@
</span><span class="cx">             if self.resource.getChild(name.encode(&quot;utf-8&quot;)):
</span><span class="cx">                 yield row
</span><span class="cx">             else:
</span><del>-                log.error(&quot;vCard resource %s is missing from %s. Removing from index.&quot;
-                          % (name, self.resource))
</del><ins>+                log.error(
+                    &quot;vCard resource {name} is missing from {rsrc}. Removing from index.&quot;,
+                    name=name, rsrc=self.resource,
+                )
</ins><span class="cx">                 self.deleteResource(name, None)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -527,8 +529,10 @@
</span><span class="cx">             if self.resource.getChild(name.encode(&quot;utf-8&quot;)):
</span><span class="cx">                 yield row
</span><span class="cx">             else:
</span><del>-                log.error(&quot;AddressBook resource %s is missing from %s. Removing from index.&quot;
-                          % (name, self.resource))
</del><ins>+                log.error(
+                    &quot;AddressBook resource {name} is missing from {rsrc}. Removing from index.&quot;,
+                    name=name, rsrc=self.resource,
+                )
</ins><span class="cx">                 self.deleteResource(name)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -644,7 +648,7 @@
</span><span class="cx">             try:
</span><span class="cx">                 stream = child.open()
</span><span class="cx">             except (IOError, OSError), e:
</span><del>-                log.error(&quot;Unable to open resource %s: %s&quot; % (name, e))
</del><ins>+                log.error(&quot;Unable to open resource {name}: {ex}&quot;, name=name, ex=e)
</ins><span class="cx">                 continue
</span><span class="cx"> 
</span><span class="cx">             try:
</span><span class="lines">@@ -654,9 +658,9 @@
</span><span class="cx">                     vcard.validVCardData()
</span><span class="cx">                     vcard.validForCardDAV()
</span><span class="cx">                 except ValueError:
</span><del>-                    log.error(&quot;Non-addressbook resource: %s&quot; % (name,))
</del><ins>+                    log.error(&quot;Non-addressbook resource: {name}&quot;, name=name)
</ins><span class="cx">                 else:
</span><del>-                    # log.info(&quot;Indexing resource: %s&quot; % (name,))
</del><ins>+                    # log.info(&quot;Indexing resource: {name}&quot;, name=name)
</ins><span class="cx">                     self.addResource(name, vcard, True)
</span><span class="cx">             finally:
</span><span class="cx">                 stream.close()
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcarddavdatastoresqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/sql.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/sql.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/sql.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -2759,10 +2759,10 @@
</span><span class="cx">                 fixed, unfixed = component.validVCardData(doFix=True, doRaise=False)
</span><span class="cx"> 
</span><span class="cx">                 if unfixed:
</span><del>-                    self.log.error(&quot;Address data id=%s had unfixable problems:\n  %s&quot; % (self._resourceID, &quot;\n  &quot;.join(unfixed),))
</del><ins>+                    self.log.error(&quot;Address data id={id} had unfixable problems:\n  {problems}&quot;, id=self._resourceID, problems=&quot;\n  &quot;.join(unfixed))
</ins><span class="cx"> 
</span><span class="cx">                 if fixed:
</span><del>-                    self.log.error(&quot;Address data id=%s had fixable problems:\n  %s&quot; % (self._resourceID, &quot;\n  &quot;.join(fixed),))
</del><ins>+                    self.log.error(&quot;Address data id={id} had fixable problems:\n  {problems}&quot;, id=self._resourceID, problems=&quot;\n  &quot;.join(fixed))
</ins><span class="cx"> 
</span><span class="cx">                 if self._kind == _ABO_KIND_GROUP:
</span><span class="cx">                     assert not component.hasProperty(&quot;X-ADDRESSBOOKSERVER-MEMBER&quot;), &quot;database group vCard text contains members %s&quot; % (component,)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcarddavdatastoretesttest_sqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/test/test_sql.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/test/test_sql.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/test/test_sql.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -779,7 +779,9 @@
</span><span class="cx">         yield d1
</span><span class="cx">         yield d2
</span><span class="cx"> 
</span><ins>+        self.flushLoggedErrors()
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_resourceLock(self):
</span><span class="cx">         &quot;&quot;&quot;
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcarddavdatastoreutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/util.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/util.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/carddav/datastore/util.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -101,20 +101,22 @@
</span><span class="cx">             ok_count += 1
</span><span class="cx"> 
</span><span class="cx">         except InternalDataStoreError:
</span><del>-            log.error(&quot;  InternalDataStoreError: Failed to migrate address book object: %s/%s/%s&quot; % (
-                inAddressbook.ownerHome().name(),
-                inAddressbook.name(),
-                addressbookObject.name(),
-            ))
</del><ins>+            log.error(
+                &quot;  InternalDataStoreError: Failed to migrate address book object: {home}/{adbk}/{rsrc}&quot;,
+                home=inAddressbook.ownerHome().name(),
+                adbk=inAddressbook.name(),
+                rsrc=addressbookObject.name(),
+            )
</ins><span class="cx">             bad_count += 1
</span><span class="cx"> 
</span><span class="cx">         except Exception, e:
</span><del>-            log.error(&quot;  %s: Failed to migrate address book object: %s/%s/%s&quot; % (
-                str(e),
-                inAddressbook.ownerHome().name(),
-                inAddressbook.name(),
-                addressbookObject.name(),
-            ))
</del><ins>+            log.error(
+                &quot;  {ex}: Failed to migrate address book object: {home}/{adbk}/{rsrc}&quot;,
+                ex=str(e),
+                home=inAddressbook.ownerHome().name(),
+                adbk=inAddressbook.name(),
+                rsrc=addressbookObject.name(),
+            )
</ins><span class="cx">             bad_count += 1
</span><span class="cx"> 
</span><span class="cx">     returnValue((ok_count, bad_count,))
</span><span class="lines">@@ -134,4 +136,4 @@
</span><span class="cx">         try:
</span><span class="cx">             yield _migrateAddressbook(addressbook, outAddressbook, getComponent)
</span><span class="cx">         except InternalDataStoreError:
</span><del>-            log.error(&quot;  Failed to migrate address book: %s/%s&quot; % (inHome.name(), name,))
</del><ins>+            log.error(&quot;  Failed to migrate address book: {home}/{name}&quot;, home=inHome.name(), name=name)
</ins></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcommondatastorefilepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/file.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/file.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/file.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -944,7 +944,7 @@
</span><span class="cx">         old_used = self.quotaUsedBytes()
</span><span class="cx">         new_used = old_used + delta
</span><span class="cx">         if new_used &lt; 0:
</span><del>-            self.log.error(&quot;Fixing quota adjusted below zero to %s by change amount %s&quot; % (new_used, delta,))
</del><ins>+            self.log.error(&quot;Fixing quota adjusted below zero to {used} by change amount {delta}&quot;, used=new_used, delta=delta)
</ins><span class="cx">             new_used = 0
</span><span class="cx">         self.properties()[PropertyName.fromElement(TwistedQuotaUsedProperty)] = TwistedQuotaUsedProperty(str(new_used))
</span><span class="cx"> 
</span><span class="lines">@@ -1132,7 +1132,7 @@
</span><span class="cx">                     trash.remove()
</span><span class="cx">                     self.properties()._removeResource()
</span><span class="cx">                 except Exception, e:
</span><del>-                    self.log.error(&quot;Unable to delete trashed child at %s: %s&quot; % (trash.fp, e))
</del><ins>+                    self.log.error(&quot;Unable to delete trashed child at {path}: {ex}&quot;, path=trash.fp, ex=e)
</ins><span class="cx"> 
</span><span class="cx">             self._transaction.addOperation(cleanup, &quot;remove child backup %r&quot; % (self._name,))
</span><span class="cx">             def undo():
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcommondatastorepoddingmigrationhome_syncpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/podding/migration/home_sync.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/podding/migration/home_sync.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/podding/migration/home_sync.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">             except Exception as ex:
</span><span class="cx">                 f = Failure()
</span><span class="cx">                 yield txn.abort()
</span><del>-                log.error(&quot;{label} failed: {e}&quot;.format(label=label, e=str(ex)))
</del><ins>+                log.error(&quot;{label} failed: {e}&quot;, label=label, e=str(ex))
</ins><span class="cx">                 returnValue(f)
</span><span class="cx">             else:
</span><span class="cx">                 yield txn.commit()
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoresqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/sql.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/sql.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/sql.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -3021,7 +3021,6 @@
</span><span class="cx">         if trash is None:
</span><span class="cx">             if verbose:
</span><span class="cx">                 msg = &quot;No trash collection for principal&quot;
</span><del>-                print(msg)
</del><span class="cx">                 log.info(msg)
</span><span class="cx">             returnValue(None)
</span><span class="cx"> 
</span><span class="lines">@@ -3038,14 +3037,12 @@
</span><span class="cx"> 
</span><span class="cx">             if verbose:
</span><span class="cx">                 msg = &quot;Collection \&quot;{}\&quot;:&quot;.format(displayName.encode(&quot;utf-8&quot;))
</span><del>-                print(msg)
</del><span class="cx">                 log.info(msg)
</span><span class="cx">             for child in children:
</span><span class="cx">                 if verbose:
</span><span class="cx">                     component = yield child.component()
</span><span class="cx">                     summary = component.mainComponent().propertyValue(&quot;SUMMARY&quot;, &quot;&lt;no title&gt;&quot;)
</span><span class="cx">                     msg = &quot;   Removing \&quot;{}\&quot;...&quot;.format(summary)
</span><del>-                    print(msg)
</del><span class="cx">                     log.info(msg)
</span><span class="cx">                 yield child.purge(implicitly=False)
</span><span class="cx">             if verbose:
</span><span class="lines">@@ -3059,14 +3056,12 @@
</span><span class="cx">             )
</span><span class="cx">             if verbose:
</span><span class="cx">                 msg = &quot;Collection \&quot;{}\&quot;:&quot;.format(displayName.encode(&quot;utf-8&quot;))
</span><del>-                print(msg)
</del><span class="cx">                 log.info(msg)
</span><span class="cx">             for child in children:
</span><span class="cx">                 if verbose:
</span><span class="cx">                     component = yield child.component()
</span><span class="cx">                     summary = component.mainComponent().propertyValue(&quot;SUMMARY&quot;, &quot;&lt;no title&gt;&quot;)
</span><span class="cx">                     msg = &quot;   Removing \&quot;{}\&quot;...&quot;.format(summary)
</span><del>-                    print(msg)
</del><span class="cx">                     log.info(msg)
</span><span class="cx">                 yield child.purge(implicitly=False)
</span><span class="cx">             if verbose:
</span><span class="lines">@@ -3075,7 +3070,6 @@
</span><span class="cx">             if collection.whenTrashed() &lt; endTime:
</span><span class="cx">                 if verbose:
</span><span class="cx">                     msg = &quot;Removing collection \&quot;{}\&quot;...&quot;.format(displayName.encode(&quot;utf-8&quot;))
</span><del>-                    print(msg)
</del><span class="cx">                     log.info(msg)
</span><span class="cx">                 yield collection.purge()
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoretesttest_sqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/test/test_sql.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/test/test_sql.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/test/test_sql.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -235,7 +235,7 @@
</span><span class="cx">         try:
</span><span class="cx">             (yield txn.subtransaction(_test, retries=0))[0][0]
</span><span class="cx">         except AllRetriesFailed:
</span><del>-            pass
</del><ins>+            self.flushLoggedErrors()
</ins><span class="cx">         else:
</span><span class="cx">             self.fail(&quot;AllRetriesFailed not raised&quot;)
</span><span class="cx">         self.assertEqual(ctr[0], 1)
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx">         try:
</span><span class="cx">             (yield txn.subtransaction(_test, retries=2))[0][0]
</span><span class="cx">         except AllRetriesFailed:
</span><del>-            pass
</del><ins>+            self.flushLoggedErrors()
</ins><span class="cx">         else:
</span><span class="cx">             self.fail(&quot;AllRetriesFailed not raised&quot;)
</span><span class="cx">         self.assertEqual(ctr[0], 3)
</span><span class="lines">@@ -294,7 +294,7 @@
</span><span class="cx">         try:
</span><span class="cx">             result = yield started
</span><span class="cx">         except AllRetriesFailed:
</span><del>-            pass
</del><ins>+            self.flushLoggedErrors()
</ins><span class="cx">         else:
</span><span class="cx">             self.fail(&quot;AllRetriesFailed not raised, %r returned instead&quot; %
</span><span class="cx">                       (result,))
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoretestutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/test/util.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/test/util.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/test/util.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -348,7 +348,7 @@
</span><span class="cx">                     yield cleanupTxn.execSQL(&quot;select {}.nextval from dual&quot;.format(sequence.name), [])
</span><span class="cx">                     yield cleanupTxn.execSQL(&quot;alter sequence {} increment by {}&quot;.format(sequence.name, 1), [])
</span><span class="cx">             except:
</span><del>-                log.failure(&quot;setval sequence '{}' failed&quot;, sequence=sequence.name)
</del><ins>+                log.failure(&quot;setval sequence '{sequence}' failed&quot;, sequence=sequence.name)
</ins><span class="cx">         yield cleanupTxn.execSQL(&quot;update CALENDARSERVER set VALUE = '1' where NAME = 'MIN-VALID-REVISION'&quot;, [])
</span><span class="cx"> 
</span><span class="cx">         yield cleanupTxn.commit()
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoreupgrademigratepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/upgrade/migrate.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/upgrade/migrate.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/upgrade/migrate.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -316,15 +316,12 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         migrateFunc, destFunc = homeTypeLookup.get(homeType)
</span><span class="cx">         uid = normalizeUUIDOrNot(fileHome.uid())
</span><del>-        self.log.warn(&quot;Starting migration transaction %s UID %r&quot; %
-                      (homeType, uid))
</del><ins>+        self.log.warn(&quot;Starting migration transaction {type} UID {uid}&quot;, type=homeType, uid=uid)
</ins><span class="cx">         sqlTxn = self.sqlStore.newTransaction(label=&quot;UpgradeToDatabaseStep.migrateOneHome&quot;)
</span><span class="cx">         homeGetter = destFunc(sqlTxn)
</span><span class="cx">         sqlHome = yield homeGetter(uid, create=False)
</span><span class="cx">         if sqlHome is not None and not self.merge:
</span><del>-            self.log.warn(
-                &quot;%s home %r already existed not migrating&quot; % (
-                    homeType, uid))
</del><ins>+            self.log.warn(&quot;{ty[e} home {uid} already existed not migrating&quot;, type=homeType, uid=uid)
</ins><span class="cx">             yield sqlTxn.abort()
</span><span class="cx">             returnValue(None)
</span><span class="cx">         try:
</span><span class="lines">@@ -395,7 +392,7 @@
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def _upgradeAction(self, fileTxn, fileHome, homeType):
</span><span class="cx">         uid = fileHome.uid()
</span><del>-        self.log.warn(&quot;Migrating %s UID %r&quot; % (homeType, uid))
</del><ins>+        self.log.warn(&quot;Migrating {type} UID {uid}&quot;, type=homeType, uid=uid)
</ins><span class="cx">         yield self.migrateOneHome(fileTxn, homeType, fileHome)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -432,6 +429,6 @@
</span><span class="cx">             (doCalendarUpgrade_4_to_5, &quot;Calendar data upgrade from v4 to v5&quot;),
</span><span class="cx">             (doAddressbookUpgrade_1_to_2, &quot;Addressbook data upgrade from v1 to v2&quot;),
</span><span class="cx">         ):
</span><del>-            self.log.warn(&quot;Migration extra step: {}&quot;.format(description))
</del><ins>+            self.log.warn(&quot;Migration extra step: {desc}&quot;, desc=description)
</ins><span class="cx">             yield upgrade(self.sqlStore)
</span><span class="cx">         self.sqlStore.setUpgrading(False)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoreupgradesqlupgradepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/upgrade/sql/upgrade.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/upgrade/sql/upgrade.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/upgrade/sql/upgrade.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -126,13 +126,13 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Do a database schema upgrade.
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        self.log.warn(&quot;Beginning database %s check.&quot; % (self.versionDescriptor,))
</del><ins>+        self.log.warn(&quot;Beginning database {vers} check.&quot;, vers=self.versionDescriptor)
</ins><span class="cx"> 
</span><span class="cx">         # Retrieve information from schema and database
</span><span class="cx">         dialect, required_version, actual_version = yield self.getVersions()
</span><span class="cx"> 
</span><span class="cx">         if required_version == actual_version:
</span><del>-            self.log.warn(&quot;%s version check complete: no upgrade needed.&quot; % (self.versionDescriptor.capitalize(),))
</del><ins>+            self.log.warn(&quot;{vers} version check complete: no upgrade needed.&quot;, vers=self.versionDescriptor.capitalize())
</ins><span class="cx">         elif required_version &lt; actual_version:
</span><span class="cx">             msg = &quot;Actual %s version %s is more recent than the expected version %s. The service cannot be started&quot; % (
</span><span class="cx">                 self.versionDescriptor, actual_version, required_version,
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx">             yield self.upgradeVersion(actual_version, required_version, dialect)
</span><span class="cx">             self.sqlStore.setUpgrading(False)
</span><span class="cx"> 
</span><del>-        self.log.warn(&quot;Database %s check complete.&quot; % (self.versionDescriptor,))
</del><ins>+        self.log.warn(&quot;Database {vers} check complete.&quot;, vers=self.versionDescriptor)
</ins><span class="cx"> 
</span><span class="cx">         returnValue(None)
</span><span class="cx"> 
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx">             raise RuntimeError(msg)
</span><span class="cx">         else:
</span><span class="cx">             required_version = int(found.group(1))
</span><del>-            self.log.warn(&quot;Required database key %s: %s.&quot; % (self.versionKey, required_version,))
</del><ins>+            self.log.warn(&quot;Required database key {key}: {vers}.&quot;, key=self.versionKey, vers=required_version)
</ins><span class="cx"> 
</span><span class="cx">         # Get the schema version in the current database
</span><span class="cx">         sqlTxn = self.sqlStore.newTransaction(label=&quot;UpgradeDatabaseCoreStep.getVersions&quot;)
</span><span class="lines">@@ -178,14 +178,14 @@
</span><span class="cx">             yield sqlTxn.commit()
</span><span class="cx">         except (RuntimeError, ValueError):
</span><span class="cx">             f = Failure()
</span><del>-            self.log.error(&quot;Database key %s cannot be determined.&quot; % (self.versionKey,))
</del><ins>+            self.log.error(&quot;Database key {key} cannot be determined.&quot;, key=self.versionKey)
</ins><span class="cx">             yield sqlTxn.abort()
</span><span class="cx">             if self.defaultKeyValue is None:
</span><span class="cx">                 f.raiseException()
</span><span class="cx">             else:
</span><span class="cx">                 actual_version = self.defaultKeyValue
</span><span class="cx"> 
</span><del>-        self.log.warn(&quot;Actual database key %s: %s.&quot; % (self.versionKey, actual_version,))
</del><ins>+        self.log.warn(&quot;Actual database key {key}: {vers}.&quot;, key=self.versionKey, vers=actual_version)
</ins><span class="cx"> 
</span><span class="cx">         returnValue((dialect, required_version, actual_version,))
</span><span class="cx"> 
</span><span class="lines">@@ -197,7 +197,7 @@
</span><span class="cx">         looking for upgrade_from_X_to_Y.sql files that cover the full range of upgrades.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-        self.log.warn(&quot;Starting %s upgrade from version %d to %d.&quot; % (self.versionDescriptor, fromVersion, toVersion,))
</del><ins>+        self.log.warn(&quot;Starting {vers} upgrade from version {fr} to {to}.&quot;, vers=self.versionDescriptor, fr=fromVersion, to=toVersion)
</ins><span class="cx"> 
</span><span class="cx">         # Scan for all possible upgrade files - returned sorted
</span><span class="cx">         files = self.scanForUpgradeFiles(dialect)
</span><span class="lines">@@ -210,10 +210,10 @@
</span><span class="cx">             for fp in upgrades:
</span><span class="cx">                 yield self.applyUpgrade(fp)
</span><span class="cx">         except RuntimeError:
</span><del>-            self.log.error(&quot;Database %s upgrade failed using: %s&quot; % (self.versionDescriptor, fp.basename(),))
</del><ins>+            self.log.error(&quot;Database {vers} upgrade failed using: {path}&quot;, vers=self.versionDescriptor, path=fp.basename())
</ins><span class="cx">             raise
</span><span class="cx"> 
</span><del>-        self.log.warn(&quot;%s upgraded from version %d to %d.&quot; % (self.versionDescriptor.capitalize(), fromVersion, toVersion,))
</del><ins>+        self.log.warn(&quot;{vers} upgraded from version {fr} to {o}.&quot;, vers=self.versionDescriptor.capitalize(), fr=fromVersion, to=toVersion)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def getPathToUpgrades(self, dialect):
</span><span class="lines">@@ -312,7 +312,7 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Apply the schema upgrade .sql file to the database.
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        self.log.warn(&quot;Applying schema upgrade: %s&quot; % (fp.basename(),))
</del><ins>+        self.log.warn(&quot;Applying schema upgrade: {path}&quot;, path=fp.basename())
</ins><span class="cx">         sqlTxn = self.sqlStore.newTransaction(label=&quot;UpgradeDatabaseSchemaStep.applyUpgrade&quot;)
</span><span class="cx">         try:
</span><span class="cx">             sql = fp.getContent()
</span><span class="lines">@@ -356,7 +356,7 @@
</span><span class="cx">             self.log.error(msg)
</span><span class="cx">             raise RuntimeError(msg)
</span><span class="cx"> 
</span><del>-        self.log.warn(&quot;Applying data upgrade: %s&quot; % (module,))
</del><ins>+        self.log.warn(&quot;Applying data upgrade: {module}&quot;, module=module)
</ins><span class="cx">         yield doUpgrade(self.sqlStore)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -467,7 +467,7 @@
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Do upgrades.
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        self.log.warn(&quot;Beginning database %s check.&quot; % (self.versionDescriptor,))
</del><ins>+        self.log.warn(&quot;Beginning database {vers} check.&quot;, vers=self.versionDescriptor)
</ins><span class="cx"> 
</span><span class="cx">         # Do each upgrade in our own predefined order
</span><span class="cx">         self.sqlStore.setUpgrading(True)
</span><span class="lines">@@ -477,6 +477,6 @@
</span><span class="cx"> 
</span><span class="cx">         self.sqlStore.setUpgrading(False)
</span><span class="cx"> 
</span><del>-        self.log.warn(&quot;Database %s check complete.&quot; % (self.versionDescriptor,))
</del><ins>+        self.log.warn(&quot;Database {vers} check complete.&quot;, vers=self.versionDescriptor)
</ins><span class="cx"> 
</span><span class="cx">         returnValue(None)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoreworkinbox_cleanuppy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/work/inbox_cleanup.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/work/inbox_cleanup.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/work/inbox_cleanup.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -64,8 +64,10 @@
</span><span class="cx">         ).on(self.transaction))[0][0]
</span><span class="cx"> 
</span><span class="cx">         if queuedCleanupOneInboxWorkItems:
</span><del>-            log.error(&quot;Inbox cleanup work: Can't schedule per home cleanup because {} work items still queued.&quot;.format(
-                queuedCleanupOneInboxWorkItems))
</del><ins>+            log.error(
+                &quot;Inbox cleanup work: Can't schedule per home cleanup because {} work items still queued.&quot;,
+                queuedCleanupOneInboxWorkItems
+            )
</ins><span class="cx">         else:
</span><span class="cx">             # enumerate provisioned normal calendar homes
</span><span class="cx">             ch = schema.CALENDAR_HOME
</span><span class="lines">@@ -95,8 +97,10 @@
</span><span class="cx">         ))
</span><span class="cx">         if orphanNames:
</span><span class="cx">             home = yield self.transaction.calendarHomeWithResourceID(self.homeID)
</span><del>-            log.info(&quot;Inbox cleanup work in home: {homeUID}, deleting orphaned items: {orphanNames}&quot;.format(
-                homeUID=home.uid(), orphanNames=orphanNames))
</del><ins>+            log.info(
+                &quot;Inbox cleanup work in home: {homeUID}, deleting orphaned items: {orphanNames}&quot;,
+                homeUID=home.uid(), orphanNames=orphanNames,
+            )
</ins><span class="cx"> 
</span><span class="cx">         # get old item names
</span><span class="cx">         if float(config.InboxCleanup.ItemLifetimeDays) &gt;= 0: # use -1 to disable; 0 is test case
</span><span class="lines">@@ -107,8 +111,10 @@
</span><span class="cx">             newDeleters = oldItemNames - orphanNames
</span><span class="cx">             if newDeleters:
</span><span class="cx">                 home = yield self.transaction.calendarHomeWithResourceID(self.homeID)
</span><del>-                log.info(&quot;Inbox cleanup work in home: {homeUID}, deleting old items: {newDeleters}&quot;.format(
-                    homeUID=home.uid(), newDeleters=newDeleters))
</del><ins>+                log.info(
+                    &quot;Inbox cleanup work in home: {homeUID}, deleting old items: {newDeleters}&quot;,
+                    homeUID=home.uid(), newDeleters=newDeleters,
+                )
</ins><span class="cx">         else:
</span><span class="cx">             oldItemNames = set()
</span><span class="cx"> 
</span><span class="lines">@@ -121,8 +127,10 @@
</span><span class="cx">             newDeleters = itemNamesForOldEvents - oldItemNames - orphanNames
</span><span class="cx">             if newDeleters:
</span><span class="cx">                 home = yield self.transaction.calendarHomeWithResourceID(self.homeID)
</span><del>-                log.info(&quot;Inbox cleanup work in home: {homeUID}, deleting items for old events: {newDeleters}&quot;.format(
-                    homeUID=home.uid(), newDeleters=newDeleters))
</del><ins>+                log.info(
+                    &quot;Inbox cleanup work in home: {homeUID}, deleting items for old events: {newDeleters}&quot;,
+                    homeUID=home.uid(), newDeleters=newDeleters,
+                )
</ins><span class="cx">         else:
</span><span class="cx">             itemNamesForOldEvents = set()
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavcommondatastoreworkload_workpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/work/load_work.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/work/load_work.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/common/datastore/work/load_work.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -66,11 +66,11 @@
</span><span class="cx">         All this work does is wait for the specified amount of time.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-        log.debug(&quot;TestWork started: {}&quot;.format(self.jobID))
</del><ins>+        log.debug(&quot;TestWork started: {jobid}&quot;, jobid=self.jobID)
</ins><span class="cx">         if self.delay != 0:
</span><span class="cx">             wait = Deferred()
</span><span class="cx">             def _timedDeferred():
</span><span class="cx">                 wait.callback(True)
</span><span class="cx">             reactor.callLater(self.delay / 1000.0, _timedDeferred)
</span><span class="cx">             yield wait
</span><del>-        log.debug(&quot;TestWork done: {}&quot;.format(self.jobID))
</del><ins>+        log.debug(&quot;TestWork done: {jobid}&quot;, jobid=self.jobID)
</ins></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavdpsserverpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/dps/server.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/dps/server.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/dps/server.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -18,11 +18,13 @@
</span><span class="cx"> import datetime
</span><span class="cx"> import uuid
</span><span class="cx"> 
</span><ins>+from calendarserver.tap.caldav import ErrorLoggingMultiService
</ins><span class="cx"> from calendarserver.tap.util import getDBPool, storeFromConfigWithDPSServer
</span><ins>+
</ins><span class="cx"> from twext.python.log import Logger
</span><span class="cx"> from twext.who.expression import MatchType, MatchFlags, Operand
</span><ins>+
</ins><span class="cx"> from twisted.application import service
</span><del>-from twisted.application.service import MultiService
</del><span class="cx"> from twisted.application.strports import service as strPortsService
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks, returnValue
</span><span class="cx"> from twisted.internet.protocol import Factory
</span><span class="lines">@@ -33,6 +35,7 @@
</span><span class="cx"> from twistedcaldav import memcachepool
</span><span class="cx"> from twistedcaldav.config import config
</span><span class="cx"> from twistedcaldav.stdconfig import DEFAULT_CONFIG, DEFAULT_CONFIG_FILE
</span><ins>+
</ins><span class="cx"> from txdav.dps.commands import (
</span><span class="cx">     RecordWithShortNameCommand, RecordWithUIDCommand, RecordWithGUIDCommand,
</span><span class="cx">     RecordsWithRecordTypeCommand, RecordsWithEmailAddressCommand,
</span><span class="lines">@@ -45,6 +48,7 @@
</span><span class="cx">     UpdateRecordsCommand, FlushCommand,  # RemoveRecordsCommand,
</span><span class="cx"> )
</span><span class="cx"> from txdav.who.wiki import WikiAccessLevel
</span><ins>+
</ins><span class="cx"> from zope.interface import implementer
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -808,7 +812,8 @@
</span><span class="cx">         else:
</span><span class="cx">             setproctitle(&quot;CalendarServer Directory Proxy Service&quot;)
</span><span class="cx"> 
</span><del>-        multiService = MultiService()
</del><ins>+        # Setup default logging behavior
+        multiService = ErrorLoggingMultiService(False, &quot;&quot;, 0, 0, False)
</ins><span class="cx"> 
</span><span class="cx">         try:
</span><span class="cx">             pool, txnFactory = getDBPool(config)
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavwhodelegatespy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/who/delegates.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/who/delegates.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/who/delegates.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -500,11 +500,11 @@
</span><span class="cx">         # Try cache first
</span><span class="cx">         delegateUIDs = yield self._memcacher.getMembers(delegator.uid, readWrite, expanded)
</span><span class="cx">         if delegateUIDs is not None:
</span><del>-            log.debug(&quot;_delegatesOfUIDs cached for: {} and read-write = {} and expanded = {}&quot;.format(delegator.uid, readWrite, expanded,))
</del><ins>+            log.debug(&quot;_delegatesOfUIDs cached for: {uid} and read-write = {rw} and expanded = {expanded}&quot;, uid=delegator.uid, rw=readWrite, expanded=expanded)
</ins><span class="cx">             returnValue(delegateUIDs)
</span><span class="cx"> 
</span><span class="cx">         # Get from the store
</span><del>-        log.debug(&quot;_delegatesOfUIDs for: {} and read-write = {} and expanded = {}&quot;.format(delegator.uid, readWrite, expanded,))
</del><ins>+        log.debug(&quot;_delegatesOfUIDs for: {uid} and read-write = {rw} and expanded = {expanded}&quot;, uid=delegator.uid, rw=readWrite, expanded=expanded)
</ins><span class="cx">         if delegator.thisServer():
</span><span class="cx">             delegateUIDs = yield txn.delegates(delegator.uid, readWrite, expanded=expanded)
</span><span class="cx"> 
</span><span class="lines">@@ -539,11 +539,11 @@
</span><span class="cx">         # Try cache first
</span><span class="cx">         delegatorUIDs = yield self._memcacher.getMemberships(delegate.uid, readWrite)
</span><span class="cx">         if delegatorUIDs is not None:
</span><del>-            log.debug(&quot;_delegatedToUIDs cached for: {} and read-write = {}&quot;.format(delegate.uid, readWrite,))
</del><ins>+            log.debug(&quot;_delegatedToUIDs cached for: {uid} and read-write = {rw}&quot;, uid=delegate.uid, rw=readWrite)
</ins><span class="cx">             returnValue(delegatorUIDs)
</span><span class="cx"> 
</span><span class="cx">         # Get from the store
</span><del>-        log.debug(&quot;_delegatedToUIDs for: {} and read-write = {}&quot;.format(delegate.uid, readWrite,))
</del><ins>+        log.debug(&quot;_delegatedToUIDs for: {uid} and read-write = {rw}&quot;, uid=delegate.uid, rw=readWrite)
</ins><span class="cx">         delegatorUIDs = (yield txn.delegators(delegate.uid, readWrite))
</span><span class="cx">         if not onlyThisServer and config.Servers.Enabled:
</span><span class="cx">             delegatorUIDs.update((yield self._podDelegators(txn, delegate, readWrite)))
</span><span class="lines">@@ -583,7 +583,7 @@
</span><span class="cx">         @rtype: a Deferred which fires a set of L{str}
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-        log.debug(&quot;_podDelegates for: {} and read-write = {} and expanded = {}&quot;.format(delegator.uid, readWrite, expanded,))
</del><ins>+        log.debug(&quot;_podDelegates for: {uid} and read-write = {rw} and expanded = {expanded}&quot;, uid=delegator.uid, rw=readWrite, expanded=expanded)
</ins><span class="cx">         return txn.store().conduit.send_get_delegates(txn, delegator, readWrite, expanded)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -601,7 +601,7 @@
</span><span class="cx">         @rtype: a Deferred which fires a set of L{str}
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-        log.debug(&quot;_podDelegators for: {} and read-write = {}&quot;.format(delegate.uid, readWrite,))
</del><ins>+        log.debug(&quot;_podDelegators for: {uid} and read-write = {rw}&quot;, uid=delegate.uid, rw=readWrite)
</ins><span class="cx">         results = yield DeferredList([
</span><span class="cx">             txn.store().conduit.send_get_delegators(txn, server, delegate, readWrite) for
</span><span class="cx">             server in txn.directoryService().serversDB().allServersExceptThis()
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavwhodirectorypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/who/directory.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/who/directory.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/who/directory.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -448,12 +448,12 @@
</span><span class="cx">         # if config.EnableSACLs and self.CheckSACL:
</span><span class="cx">         #     username = self.shortNames[0]
</span><span class="cx">         #     if self.CheckSACL(username, &quot;calendar&quot;) != 0:
</span><del>-        #         self.log.debug(&quot;%s is not enabled for calendaring due to SACL&quot;
-        #                        % (username,))
</del><ins>+        #         self.log.debug(&quot;{user} is not enabled for calendaring due to SACL&quot;
+        #                        user=username)
</ins><span class="cx">         #         self.enabledForCalendaring = False
</span><span class="cx">         #     if self.CheckSACL(username, &quot;addressbook&quot;) != 0:
</span><del>-        #         self.log.debug(&quot;%s is not enabled for addressbooks due to SACL&quot;
-        #                        % (username,))
</del><ins>+        #         self.log.debug(&quot;{user} is not enabled for addressbooks due to SACL&quot;
+        #                        user=username)
</ins><span class="cx">         #         self.enabledForAddressBooks = False
</span><span class="cx"> 
</span><span class="cx">     @property
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxdavxmlbasepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txdav/xml/base.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txdav/xml/base.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txdav/xml/base.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -214,8 +214,8 @@
</span><span class="cx">             else:
</span><span class="cx">                 if not (isinstance(child, PCDATAElement) and child.isWhitespace()):
</span><span class="cx">                     log.debug(
</span><del>-                        &quot;Child of type %s is unexpected and therefore ignored in %s element&quot;
-                        % (child.sname(), self.sname())
</del><ins>+                        &quot;Child of type {child} is unexpected and therefore ignored in {this} element&quot;,
+                        child=child.sname(), this=self.sname(),
</ins><span class="cx">                     )
</span><span class="cx"> 
</span><span class="cx">         for qname, (min, max) in allowed_children.items():
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx">         if self.allowed_attributes:
</span><span class="cx">             for name in attributes:
</span><span class="cx">                 if name not in self.allowed_attributes:
</span><del>-                    log.debug(&quot;Attribute %s is unexpected in %s element&quot; % (name, self.sname()))
</del><ins>+                    log.debug(&quot;Attribute {attr} is unexpected in {this} element&quot;, attr=name, this=self.sname())
</ins><span class="cx">                 my_attributes[name] = attributes[name]
</span><span class="cx"> 
</span><span class="cx">             for name, required in self.allowed_attributes.items():
</span><span class="lines">@@ -243,8 +243,7 @@
</span><span class="cx"> 
</span><span class="cx">         else:
</span><span class="cx">             if not isinstance(self, WebDAVUnknownElement) and attributes:
</span><del>-                log.debug(&quot;Attributes %s are unexpected in %s element&quot;
-                          % (attributes.keys(), self.sname()))
</del><ins>+                log.debug(&quot;Attributes {attrs} are unexpected in {this} element&quot;, attrs=attributes.keys(), this=self.sname())
</ins><span class="cx">             my_attributes.update(attributes)
</span><span class="cx"> 
</span><span class="cx">         self.attributes = my_attributes
</span><span class="lines">@@ -390,7 +389,7 @@
</span><span class="cx">                 try:
</span><span class="cx">                     child.addToDOM(document, element)
</span><span class="cx">                 except:
</span><del>-                    log.error(&quot;Unable to add child %r of element %s to DOM&quot; % (child, self))
</del><ins>+                    log.error(&quot;Unable to add child {child!r} of element {this!r} to DOM&quot;, child=child, this=self)
</ins><span class="cx">                     raise
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -511,7 +510,7 @@
</span><span class="cx">         try:
</span><span class="cx">             parent.appendChild(self.element(document))
</span><span class="cx">         except TypeError:
</span><del>-            log.error(&quot;Invalid PCDATA: %r&quot; % (self.data,))
</del><ins>+            log.error(&quot;Invalid PCDATA: {data!r}&quot;, data=self.data)
</ins><span class="cx">             raise
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxweb2davhttppy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txweb2/dav/http.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txweb2/dav/http.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txweb2/dav/http.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -191,8 +191,8 @@
</span><span class="cx"> 
</span><span class="cx">         if code &gt; 400:  # Error codes only
</span><span class="cx">             log.error(
</span><del>-                &quot;Error during {method} for {path}: {message}&quot;,
-                method=self.method, path=path, message=message
</del><ins>+                &quot;Error during {method} for {path}: {msg}&quot;,
+                method=self.method, path=path, msg=message
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">         uri = path[self.path_basename_len:]
</span><span class="lines">@@ -264,8 +264,8 @@
</span><span class="cx"> 
</span><span class="cx">         if code &gt; 400:  # Error codes only
</span><span class="cx">             log.error(
</span><del>-                &quot;Error during {method} for {property}: {message}&quot;,
-                method=self.method, property=property, message=message
</del><ins>+                &quot;Error during {method} for {property}: {msg}&quot;,
+                method=self.method, property=property, msg=message
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">         children = []
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxweb2httppy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txweb2/http.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txweb2/http.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txweb2/http.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -492,7 +492,7 @@
</span><span class="cx"> 
</span><span class="cx">     def _error(self, reason):
</span><span class="cx">         if reason.check(error.ConnectionLost):
</span><del>-            log.info(&quot;Request error: {message}&quot;, message=reason.getErrorMessage())
</del><ins>+            log.info(&quot;Request error: {msg}&quot;, msg=reason.getErrorMessage())
</ins><span class="cx">         else:
</span><span class="cx">             log.failure(&quot;Request error&quot;, reason)
</span><span class="cx">             # Only bother with cleanup on errors other than lost connection.
</span></span></pre></div>
<a id="CalendarServerbranchesuserscdaboonewlogtxweb2logpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/cdaboo/newlog/txweb2/log.py (15300 => 15301)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/cdaboo/newlog/txweb2/log.py        2015-11-10 00:00:49 UTC (rev 15300)
+++ CalendarServer/branches/users/cdaboo/newlog/txweb2/log.py        2015-11-10 00:06:26 UTC (rev 15301)
</span><span class="lines">@@ -212,12 +212,12 @@
</span><span class="cx">     def start(self):
</span><span class="cx">         &quot;&quot;&quot;Start observing log events.&quot;&quot;&quot;
</span><span class="cx">         # Use the root publisher to bypass log level filtering
</span><del>-        log.publisher.addObserver(self.emit, filtered=False)
</del><ins>+        log.observer.addObserver(self.emit)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def stop(self):
</span><span class="cx">         &quot;&quot;&quot;Stop observing log events.&quot;&quot;&quot;
</span><del>-        log.publisher.removeObserver(self.emit)
</del><ins>+        log.observer.removeObserver(self.emit)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>