ArdentLoggerBundle/Entity/LogEntry.php

200 lines
3.0 KiB
PHP
Raw Permalink Normal View History

2019-05-24 16:40:34 +02:00
<?php
namespace App\Ardent\LoggerBundle\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="logger_bundle_log_entries")
* @ORM\HasLifecycleCallbacks
*/
class LogEntry
{
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
2019-05-28 16:06:03 +02:00
* @ORM\Column(type="text")
2019-05-24 16:40:34 +02:00
*/
private $message;
/**
* @ORM\Column(type="array")
*/
private $context;
/**
* @ORM\Column(type="integer")
*/
private $level;
/**
* @ORM\Column(type="string")
*/
private $levelName;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $channel;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\PrePersist
*/
public function onPrePersist()
{
$this->createdAt = new DateTime();
}
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
2019-05-28 16:06:03 +02:00
*
2019-05-24 16:40:34 +02:00
* @return LogEntry
*/
public function setId($id)
{
$this->id = $id;
2019-05-28 16:06:03 +02:00
2019-05-24 16:40:34 +02:00
return $this;
}
/**
* @return mixed
*/
public function getMessage()
{
return $this->message;
}
/**
* @param mixed $message
2019-05-28 16:06:03 +02:00
*
2019-05-24 16:40:34 +02:00
* @return LogEntry
*/
public function setMessage($message)
{
$this->message = $message;
2019-05-28 16:06:03 +02:00
2019-05-24 16:40:34 +02:00
return $this;
}
/**
* @return mixed
*/
public function getContext()
{
return $this->context;
}
/**
* @param mixed $context
2019-05-28 16:06:03 +02:00
*
2019-05-24 16:40:34 +02:00
* @return LogEntry
*/
public function setContext($context)
{
$this->context = $context;
2019-05-28 16:06:03 +02:00
2019-05-24 16:40:34 +02:00
return $this;
}
/**
* @return mixed
*/
public function getLevel()
{
return $this->level;
}
/**
* @param mixed $level
2019-05-28 16:06:03 +02:00
*
2019-05-24 16:40:34 +02:00
* @return LogEntry
*/
public function setLevel($level)
{
$this->level = $level;
2019-05-28 16:06:03 +02:00
2019-05-24 16:40:34 +02:00
return $this;
}
/**
* @return mixed
*/
public function getLevelName()
{
return $this->levelName;
}
/**
* @param mixed $levelName
2019-05-28 16:06:03 +02:00
*
2019-05-24 16:40:34 +02:00
* @return LogEntry
*/
public function setLevelName($levelName)
{
$this->levelName = $levelName;
2019-05-28 16:06:03 +02:00
2019-05-24 16:40:34 +02:00
return $this;
}
/**
* @return mixed
*/
public function getChannel()
{
return $this->channel;
}
/**
* @param mixed $channel
2019-05-28 16:06:03 +02:00
*
2019-05-24 16:40:34 +02:00
* @return LogEntry
*/
public function setChannel($channel)
{
$this->channel = $channel;
2019-05-28 16:06:03 +02:00
2019-05-24 16:40:34 +02:00
return $this;
}
/**
* @return mixed
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @param mixed $createdAt
2019-05-28 16:06:03 +02:00
*
2019-05-24 16:40:34 +02:00
* @return LogEntry
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
2019-05-28 16:06:03 +02:00
2019-05-24 16:40:34 +02:00
return $this;
}
2019-05-28 16:06:03 +02:00
}