Fetch the log path from the configuration

...instead of using a getter that has been dropped carelessly.

fixes #8972
This commit is contained in:
Johannes Meyer 2015-04-07 10:34:55 +02:00
parent b0b95ab387
commit aae1d05684
1 changed files with 3 additions and 3 deletions

View File

@ -3,6 +3,7 @@
use Icinga\Module\Monitoring\Controller;
use Icinga\Web\Url;
use Icinga\Application\Config;
use Icinga\Application\Logger;
use Icinga\Data\ConfigObject;
use Icinga\Protocol\File\FileReader;
@ -44,11 +45,10 @@ class ListController extends Controller
$pattern = '/^(?<datetime>[0-9]{4}(-[0-9]{2}){2}' // date
. 'T[0-9]{2}(:[0-9]{2}){2}([\\+\\-][0-9]{2}:[0-9]{2})?)' // time
. ' - (?<loglevel>[A-Za-z]+)' // loglevel
. ' - (?<message>.*)$/'; // message
. ' - (?<message>.*)$/';
$loggerWriter = Logger::getInstance()->getWriter();
$resource = new FileReader(new ConfigObject(array(
'filename' => $loggerWriter->getPath(),
'filename' => Config::app()->get('logging', 'file'),
'fields' => $pattern
)));
$this->view->logData = $resource->select()->order('DESC')->paginate();