Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-26 07:03:13 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-26 07:03:13 +0300
commit87f03e484a31782d7b3b16ca541d2920131e7dd5 (patch)
tree03eee52bcfda602bd672afbc7b0f2c3e27236873 /core
parentf838fe604f2bcf94732d197b0204b176d5f22daa (diff)
- fixes #633 When specifying logging messages/errors/exceptions to a file in piwik config, the archiving breaks as path is invalid
Diffstat (limited to 'core')
-rw-r--r--core/Config.php6
-rw-r--r--core/Log.php6
2 files changed, 3 insertions, 9 deletions
diff --git a/core/Config.php b/core/Config.php
index 9338faa833..90823ef9d2 100644
--- a/core/Config.php
+++ b/core/Config.php
@@ -159,16 +159,12 @@ class Piwik_Config
}
/**
- * If called, we use the "testing" environment, which means using the database_tests and log_tests sections
- * for DB & Log configuration.
- *
+ * If called, we use the database_tests credentials
* @return void
- *
*/
public function setTestEnvironment()
{
$this->database = $this->database_tests;
- $this->log = $this->log_tests;
}
/**
diff --git a/core/Log.php b/core/Log.php
index 59f91c025b..23cb476cbf 100644
--- a/core/Log.php
+++ b/core/Log.php
@@ -35,9 +35,7 @@ abstract class Piwik_Log extends Zend_Log
$logToDatabaseColumnMapping )
{
parent::__construct();
-
-
- $this->logToFileFilename = Zend_Registry::get('config')->path->log . $logToFileFilename;
+ $this->logToFileFilename = PIWIK_INCLUDE_PATH . '/' . Zend_Registry::get('config')->log->logger_file_path . $logToFileFilename;
$this->fileFormatter = $fileFormatter;
$this->screenFormatter = $screenFormatter;
$this->logToDatabaseTableName = Piwik::prefixTable($logToDatabaseTableName);
@@ -51,8 +49,8 @@ abstract class Piwik_Log extends Zend_Log
function addWriteToFile()
{
+ Piwik_Common::mkdir(dirname($this->logToFileFilename));
$writerFile = new Zend_Log_Writer_Stream($this->logToFileFilename);
- Piwik_Common::mkdir(Zend_Registry::get('config')->path->log);
$writerFile->setFormatter( $this->fileFormatter );
$this->addWriter($writerFile);
}