for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Created by PhpStorm.
* User: arnaud
* Date: 01/11/15
* Time: 23:26
*/
namespace Ndrx\Profiler\Events;
use Symfony\Component\EventDispatcher\Event;
class Log extends Event
{
const EVENT_NAME = 'profiler.log';
protected $level;
protected $message;
protected $context;
protected $stack;
protected $timestamp;
* Log constructor.
* @param $level
* @param $message
* @param $context
* @param $stack
public function __construct($level, $message, $context, $stack = [])
$this->level = $level;
$this->message = $message;
$this->context = $context;
$this->stack = $stack;
$this->timestamp = time();
}
* @return mixed
public function getLevel()
return $this->level;
public function getMessage()
return $this->message;
public function getContext()
return $this->context;
public function getStack()
return $this->stack;
* @return array
public function toArray()
return get_object_vars($this);