mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Fetch the log path from the configuration
...instead of using a getter that has been dropped carelessly. fixes #8972
This commit is contained in:
parent
b0b95ab387
commit
aae1d05684
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
use Icinga\Module\Monitoring\Controller;
|
use Icinga\Module\Monitoring\Controller;
|
||||||
use Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
|
use Icinga\Application\Config;
|
||||||
use Icinga\Application\Logger;
|
use Icinga\Application\Logger;
|
||||||
use Icinga\Data\ConfigObject;
|
use Icinga\Data\ConfigObject;
|
||||||
use Icinga\Protocol\File\FileReader;
|
use Icinga\Protocol\File\FileReader;
|
||||||
@ -44,11 +45,10 @@ class ListController extends Controller
|
|||||||
$pattern = '/^(?<datetime>[0-9]{4}(-[0-9]{2}){2}' // date
|
$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
|
. 'T[0-9]{2}(:[0-9]{2}){2}([\\+\\-][0-9]{2}:[0-9]{2})?)' // time
|
||||||
. ' - (?<loglevel>[A-Za-z]+)' // loglevel
|
. ' - (?<loglevel>[A-Za-z]+)' // loglevel
|
||||||
. ' - (?<message>.*)$/'; // message
|
. ' - (?<message>.*)$/';
|
||||||
|
|
||||||
$loggerWriter = Logger::getInstance()->getWriter();
|
|
||||||
$resource = new FileReader(new ConfigObject(array(
|
$resource = new FileReader(new ConfigObject(array(
|
||||||
'filename' => $loggerWriter->getPath(),
|
'filename' => Config::app()->get('logging', 'file'),
|
||||||
'fields' => $pattern
|
'fields' => $pattern
|
||||||
)));
|
)));
|
||||||
$this->view->logData = $resource->select()->order('DESC')->paginate();
|
$this->view->logData = $resource->select()->order('DESC')->paginate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user