<configstring name="directory" desc="Directory to hold state files (this
directory should be writeable by the webserver):">/tmp</configstring>
</configsection>
+ <configheader>Logging</configheader>
+ <configsection name="logging">
+ <configswitch name="type" desc="For debugging, it may be useful to send
+ activesync-related log messages to a seperate log. If you want to do this,
+ set this to Custom and enter the path to the log file to use.">
+ <case name="horde" desc="Horde" />
+ <case name="custom" desc="Custom">
+ <configstring name="path" desc="Path to logfile" />
+ </case>
+ </configswitch>
+ </configsection>
<configsection name="securitypolicies">
<configheader>Security Policies</configheader>
<configswitch name="provisioning" quote="false" desc="How should device
$request = new Horde_Controller_Request_Http();
/* TODO: This is for debugging, replace with logger from injector before merge */
-//$params['logger'] = new Horde_Log_Logger(new Horde_Log_Handler_Stream(fopen('/tmp/activesync.txt', 'a')));
-$params['logger'] = $GLOBALS['injector']->getInstance('Horde_Log_Logger');
+if ($conf['activesync']['logging']['type'] == 'custom') {
+ $params['logger'] = new Horde_Log_Logger(new Horde_Log_Handler_Stream(fopen($conf['activesync']['logging']['path'], 'a')));
+} else {
+ $params['logger'] = $GLOBALS['injector']->getInstance('Horde_Log_Logger');
+}
/* Look at the Content-type of the request, if it is available, to try
* and determine what kind of request this is. */