ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
SyslogHandler.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
29
class
SyslogHandler
extends
AbstractSyslogHandler
30
{
31
protected
$ident
;
32
protected
$logopts
;
33
41
public
function
__construct
(
$ident
,
$facility
= LOG_USER,
$level
=
Logger::DEBUG
,
$bubble
=
true
,
$logopts
= LOG_PID)
42
{
43
parent::__construct(
$facility
,
$level
,
$bubble
);
44
45
$this->ident =
$ident
;
46
$this->logopts =
$logopts
;
47
}
48
52
public
function
close
()
53
{
54
closelog();
55
}
56
60
protected
function
write
(
array
$record)
61
{
62
if
(!openlog($this->ident, $this->logopts, $this->facility)) {
63
throw
new \LogicException(
'Can\'t open syslog for ident "'
.$this->ident.
'" and facility "'
.$this->facility.
'"'
);
64
}
65
syslog($this->logLevels[$record[
'level'
]], (
string
) $record[
'formatted'
]);
66
}
67
}
Monolog\Handler
Definition:
AbstractHandler.php:12
Monolog\Logger\DEBUG
const DEBUG
Detailed debug information.
Definition:
Logger.php:32
Monolog\Handler\SyslogHandler\$logopts
$logopts
Definition:
SyslogHandler.php:32
Monolog\Handler\SyslogHandler
Logs to syslog service.
Definition:
SyslogHandler.php:29
Monolog\Handler\SyslogHandler\close
close()
{}
Definition:
SyslogHandler.php:52
Logger
Monolog\Handler\SyslogHandler\write
write(array $record)
{}
Definition:
SyslogHandler.php:60
Monolog\Handler\SyslogHandler\$ident
$ident
Definition:
SyslogHandler.php:31
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
Monolog\Handler\AbstractHandler\$level
$level
Definition:
AbstractHandler.php:25
Monolog\Handler\SyslogHandler\__construct
__construct($ident, $facility=LOG_USER, $level=Logger::DEBUG, $bubble=true, $logopts=LOG_PID)
Definition:
SyslogHandler.php:41
php
Monolog\Handler\AbstractHandler\$bubble
$bubble
Definition:
AbstractHandler.php:26
Monolog\Handler\AbstractSyslogHandler
Common syslog functionality.
Definition:
AbstractSyslogHandler.php:20
Monolog\Handler\AbstractSyslogHandler\$facility
$facility
Definition:
AbstractSyslogHandler.php:22
libs
composer
vendor
monolog
monolog
src
Monolog
Handler
SyslogHandler.php
Generated on Fri Jan 17 2025 19:00:52 for ILIAS by
1.8.13 (using
Doxyfile
)