getTabs()->add($action, array( 'label' => ucfirst($action), 'url' => Url::fromPath('list/' . str_replace(' ', '', $action)) ))->extend(new OutputFormat())->extend(new DashboardAction())->extend(new MenuAction())->activate($action); } /** * Display the application log */ public function applicationlogAction() { $this->assertPermission('application/log'); if (! Logger::writesToFile()) { $this->httpNotFound('Page not found'); } $this->addTitleTab('application log'); $resource = new FileReader(new ConfigObject(array( 'filename' => Config::app()->get('logging', 'file'), 'fields' => '/(?[0-9]{4}(?:-[0-9]{2}){2}' // date . 'T[0-9]{2}(?::[0-9]{2}){2}(?:[\+\-][0-9]{2}:[0-9]{2})?)' // time . ' - (?[A-Za-z]+) - (?.*)(?!.)/msS' // loglevel, message ))); $this->view->logData = $resource->select()->order('DESC'); $this->setupLimitControl(); $this->setupPaginationControl($this->view->logData); } }