ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
LogEntriesHandler.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the Monolog package.
5  *
6  * (c) Jordi Boggiano <j.boggiano@seld.be>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
12 namespace Monolog\Handler;
13 
14 use Monolog\Logger;
15 
20 {
24  protected $logToken;
25 
34  public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true)
35  {
36  if ($useSSL && !extension_loaded('openssl')) {
37  throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler');
38  }
39 
40  $endpoint = $useSSL ? 'ssl://data.logentries.com:443' : 'data.logentries.com:80';
41  parent::__construct($endpoint, $level, $bubble);
42  $this->logToken = $token;
43  }
44 
51  protected function generateDataStream($record)
52  {
53  return $this->logToken . ' ' . $record['formatted'];
54  }
55 }
const DEBUG
Detailed debug information.
Definition: Logger.php:32
Stores to any socket - uses fsockopen() or pfsockopen().
$endpoint
Exception can be thrown if an extension for an handler is missing.
__construct($token, $useSSL=true, $level=Logger::DEBUG, $bubble=true)