[Eventlog] Show extra data in log table.

This commit is contained in:
Jan Böhmer 2020-01-25 22:52:34 +01:00
parent f7d0524f57
commit 8b1eccc48d
12 changed files with 351 additions and 2 deletions

View file

@ -56,7 +56,8 @@ use Psr\Log\LogLevel;
* 6 = "ElementCreatedLogEntry",
* 7 = "ElementEditedLogEntry",
* 8 = "ConfigChangedLogEntry",
* 9 = "DatabaseUpdatedLogEntry"
* 9 = "InstockChangedLogEntry",
* 10 = "DatabaseUpdatedLogEntry"
* })
*/
abstract class AbstractLogEntry extends DBElement
@ -144,6 +145,11 @@ abstract class AbstractLogEntry extends DBElement
*/
protected $typeString = "unknown";
/** @var array The extra data in raw (short form) saved in the DB
* @ORM\Column(name="extra", type="json")
*/
protected $extra = [];
/**
* Get the user that caused the event associated with this log entry.
* @return User
@ -305,6 +311,11 @@ abstract class AbstractLogEntry extends DBElement
return $this;
}
public function getExtraData(): array
{
return $this->extra;
}
/**
* This function converts the internal numeric log level into an PSR3 compatible level string.
* @param int $level The numerical log level