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

Commit b04473c

Browse files
author
Jamie Snape
committed
Tweak logging initialization
1 parent 63e7d9b commit b04473c

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

core/Bootstrap.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,24 @@ protected function _initConfig()
140140
if(is_writable(LOGS_PATH))
141141
{
142142
$stream = LOGS_PATH . '/' . $configGlobal->environment . '.log';
143+
$logger = Zend_Log::factory(array(
144+
array(
145+
'writerName' => 'Stream',
146+
'writerParams' => array('stream' => $stream),
147+
'formatterName' => 'Simple',
148+
'filterName' => 'Priority',
149+
'filterParams' => array('priority' => $priority))));
143150
}
144151
else
145152
{
146-
$stream = 'php://output';
153+
$logger = Zend_Log::factory(array(
154+
array(
155+
'writerName' => 'Syslog',
156+
'formatterName' => 'Simple',
157+
'filterName' => 'Priority',
158+
'filterParams' => array('priority' => $priority))));
147159
}
148-
$logger = Zend_Log::factory(array(
149-
array(
150-
'writerName' => 'Stream',
151-
'writerParams' => array('stream' => $stream),
152-
'formatterName' => 'Simple',
153-
'filterName' => 'Priority',
154-
'filterParams' => array('priority' => $priority))));
155-
if($configDatabase->database->type == 'pdo' && $configDatabase->database->params->password != 'set_your_password')
160+
if(file_exists(LOCAL_CONFIGS_PATH . '/database.local.ini'))
156161
{
157162
$columnMapping = array(
158163
'priority' => 'priority',

0 commit comments

Comments
 (0)