mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-06 07:25:32 +01:00
[Eventlog] Show extra data in log table.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user