Added a console command to view the event log.

This commit is contained in:
Jan Böhmer 2020-01-26 20:12:08 +01:00
parent 4ddc9251d1
commit 3178dcbb6c
4 changed files with 315 additions and 65 deletions

View file

@ -55,6 +55,18 @@ class LogEntryRepository extends EntityRepository
return $this->findBy(['element' => $element], ['timestamp' => $order], $limit, $offset);
}
/**
* Gets the last log entries ordered by timestamp
* @param string $order
* @param null $limit
* @param null $offset
* @return array
*/
public function getLogsOrderedByTimestamp($order = 'DESC', $limit = null, $offset = null)
{
return $this->findBy([], ['timestamp' => $order], $limit, $offset);
}
/**
* Gets the target element associated with the logentry.
* @param AbstractLogEntry $logEntry