Browse Source

trivial optimization

ADmad 13 years ago
parent
commit
1b22d48a35
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/Log/Engine/FileLog.php

+ 1 - 1
lib/Cake/Log/Engine/FileLog.php

@@ -59,7 +59,7 @@ class FileLog extends BaseLog {
 		$config = $this->config($config);
 		$this->_path = $config['path'];
 		$this->_file = $config['file'];
-		if (!empty($this->_file) && !preg_match('/\.log$/', $this->_file)) {
+		if (!empty($this->_file) && substr($this->_file, -4) !== '.log') {
 			$this->_file .= '.log';
 		}
 	}