Use a enum for level in LogEntries

This commit is contained in:
Jan Böhmer 2023-06-18 17:25:55 +02:00
parent 4a644d8712
commit 2da7463edf
18 changed files with 322 additions and 149 deletions

View file

@ -69,10 +69,9 @@ class SecurityEventLogEntry extends AbstractLogEntry
public function __construct(string $type, string $ip_address, bool $anonymize = true)
{
parent::__construct();
$this->level = self::LEVEL_INFO;
$this->setIPAddress($ip_address, $anonymize);
$this->setEventType($type);
$this->level = self::LEVEL_NOTICE;
$this->level = LogLevel::NOTICE;
}
public function setTargetElement(?AbstractDBElement $element): AbstractLogEntry