diff --git a/module/VuFind/src/VuFind/Log/LoggerFactory.php b/module/VuFind/src/VuFind/Log/LoggerFactory.php index 74676182f6152942919e7b5e9dc4a7dae2952a0d..1fb48be45528d9fdc7d8c7a04b29a30eff35f190 100644 --- a/module/VuFind/src/VuFind/Log/LoggerFactory.php +++ b/module/VuFind/src/VuFind/Log/LoggerFactory.php @@ -118,9 +118,16 @@ class LoggerFactory implements FactoryInterface */ protected function addFileWriters(Logger $logger, $config) { - $parts = explode(':', $config); - $file = $parts[0]; - $error_types = $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);