Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit e58c28d

Browse files
author
Jamie Snape
committed
Refactor log files path
1 parent 4e7bad9 commit e58c28d

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

core/AppController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ private function _logRequest()
404404
}
405405
$entry .= "\n\n";
406406

407-
$fh = fopen(BASE_PATH.'/log/trace.log', 'a');
407+
$fh = fopen(LOGS_PATH.'/trace.log', 'a');
408408
fwrite($fh, $entry);
409409
fclose($fh);
410410
}

core/Bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ protected function _initConfig()
137137
$priority = Zend_Log::DEBUG;
138138
}
139139

140-
if(is_writable(BASE_PATH . '/log'))
140+
if(is_writable(LOGS_PATH))
141141
{
142-
$stream = './log/' . $configGlobal->environment . '.log';
142+
$stream = LOGS_PATH . '/' . $configGlobal->environment . '.log';
143143
}
144144
else
145145
{

core/constant/global.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
define('CORE_CONFIGS_PATH', BASE_PATH . '/core/configs');
2222
define('LOCAL_CONFIGS_PATH', CORE_CONFIGS_PATH);
23+
define('LOGS_PATH', BASE_PATH . '/log');
2324

2425
if(file_exists(LOCAL_CONFIGS_PATH . '/core.local.ini'))
2526
{

tests/TestsBootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
array(
129129
'writerName' => 'Stream',
130130
'writerParams' => array(
131-
'stream' => BASE_PATH.'/tests/log/testing.log',
131+
'stream' => LOGS_PATH.'/testing.log',
132132
),
133133
'filterName' => 'Priority',
134134
'filterParams' => array(

0 commit comments

Comments
 (0)