ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
12namespace Monolog\Handler;
13
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}
__construct($token, $useSSL=true, $level=Logger::DEBUG, $bubble=true)
Exception can be thrown if an extension for an handler is missing.
Stores to any socket - uses fsockopen() or pfsockopen().
Monolog log channel.
Definition: Logger.php:28
const DEBUG
Detailed debug information.
Definition: Logger.php:32