Commit 9d4772d179a1073e41c7d42ed2e5141815e5490c

Authored by nbm
1 parent 7d46bec6

Make use of the new logDirectory config option.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3891 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 5 additions and 4 deletions
config/dmsDefaults.php
... ... @@ -61,21 +61,22 @@ class KTInit {
61 61 function setupLogging () {
62 62 global $default;
63 63 require_once("$default->fileSystemRoot/lib/Log.inc");
64   - $default->log = new KTLegacyLog($default->fileSystemRoot . "/log", $default->logLevel);
  64 + $oKTConfig =& KTConfig::getSingleton();
  65 + $default->log = new KTLegacyLog($oKTConfig->get('urls/logDirectory'), $default->logLevel);
65 66 $res = $default->log->initialiseLogFile();
66 67 if (PEAR::isError($res)) {
67 68 $this->handleInitError($res);
68 69 // returns only in checkup
69 70 return $res;
70 71 }
71   - $default->queryLog = new KTLegacyLog($default->fileSystemRoot . "/log", $default->logLevel, "query");
  72 + $default->queryLog = new KTLegacyLog($oKTConfig->get('urls/logDirectory'), $default->logLevel, "query");
72 73 $res = $default->queryLog->initialiseLogFile();
73 74 if (PEAR::isError($res)) {
74 75 $this->handleInitError($res);
75 76 // returns only in checkup
76 77 return $res;
77 78 }
78   - $default->timerLog = new KTLegacyLog($default->fileSystemRoot . "/log", $default->logLevel, "timer");
  79 + $default->timerLog = new KTLegacyLog($oKTConfig->get('urls/logDirectory'), $default->logLevel, "timer");
79 80 $res = $default->timerLog->initialiseLogFile();
80 81 if (PEAR::isError($res)) {
81 82 $this->handleInitError($res);
... ... @@ -87,7 +88,7 @@ class KTInit {
87 88 $default->phpErrorLog =& Log::factory('composite');
88 89  
89 90 if ($default->phpErrorLogFile) {
90   - $fileLog =& Log::factory('file', $default->fileSystemRoot . "/log/php_error_log", 'BLAH');
  91 + $fileLog =& Log::factory('file', $oKTConfig->get('urls/logDirectory') . '/php_error_log', 'KT');
91 92 $default->phpErrorLog->addChild($fileLog);
92 93 }
93 94  
... ...