diff --git a/module/VuFind/src/VuFind/Log/LoggerFactory.php b/module/VuFind/src/VuFind/Log/LoggerFactory.php index bcc6d393dd7bd84dfe262e0e43fcef5e6fbe97db..807a04a4649e3f3d1e0e3a56a4b0bd146f64f36d 100644 --- a/module/VuFind/src/VuFind/Log/LoggerFactory.php +++ b/module/VuFind/src/VuFind/Log/LoggerFactory.php @@ -116,9 +116,16 @@ class LoggerFactory implements \Zend\ServiceManager\FactoryInterface */ protected function addFileWriters(Logger $logger, $config) { - $parts = explode(':', $config); - $file = $parts[0]; - $error_types = isset($parts[1]) ? $parts[1] : ''; + // Make sure to use only the last ':' after second character to avoid trouble + // with Windows drive letters (e.g. "c:\something\logfile:error-5") + $pos = strrpos($config, ':', 2); + if ($pos > 0) { + $file = substr($config, 0, $pos); + $error_types = substr($config, $pos + 1); + } else { + $file = $config; + $error_types = ''; + } // Make Writers $filters = explode(',', $error_types);