Exemplo n.º 1
0
 /**
  * @param string  $token  Log token supplied by LogEntries
  * @param boolean $useSSL Whether or not SSL encryption should be used.
  * @param int     $level  The minimum logging level to trigger this handler
  * @param boolean $bubble Whether or not messages that are handled should bubble up the stack.
  *
  * @throws ehough_epilog_handler_MissingExtensionException If SSL encryption is set to true and OpenSSL is missing
  */
 public function __construct($token, $useSSL = true, $level = ehough_epilog_Logger::DEBUG, $bubble = true)
 {
     if ($useSSL && !extension_loaded('openssl')) {
         throw new ehough_epilog_handler_MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler');
     }
     $endpoint = $useSSL ? 'ssl://api.logentries.com:20000' : 'data.logentries.com:80';
     parent::__construct($endpoint, $level, $bubble);
     $this->logToken = $token;
 }
Exemplo n.º 2
0
 public function write(array $record)
 {
     foreach ($this->users as $user) {
         $this->user = $user;
         parent::write($record);
         $this->closeSocket();
     }
     $this->user = null;
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  *
  * @param array $record
  */
 public function write(array $record)
 {
     parent::write($record);
     $this->closeSocket();
 }