mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 01:49:05 +02:00
[Eventlog] Show extra data in log table.
This commit is contained in:
parent
f7d0524f57
commit
8b1eccc48d
12 changed files with 351 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue