// Move log classes and add logger in new installer

This commit is contained in:
rMalie
2012-01-05 16:11:43 +00:00
parent 88391f53e8
commit 602554976b
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()