// Move log classes and add logger in new installer

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12205 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-01-05 16:11:43 +00:00
parent b0791f2f31
commit 8001df3522
6 changed files with 15 additions and 13 deletions
+11
View File
@@ -32,6 +32,11 @@ abstract class InstallAbstractModel
*/
public $language;
/**
* @var FileLogger
*/
public $logger;
/**
* @var array List of errors
*/
@@ -40,6 +45,9 @@ abstract class InstallAbstractModel
public function __construct()
{
$this->language = InstallLanguages::getInstance();
$this->logger = new FileLogger();
$this->logger->setFilename(_PS_ROOT_DIR_.'/log/'.@date('Ymd').'_installation.log');
}
public function setError($errors)
@@ -48,7 +56,10 @@ abstract class InstallAbstractModel
$errors = array($errors);
foreach ($errors as $error)
{
$this->errors[] = $error;
$this->logger->logError($error);
}
}
public function getErrors()