ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Stores to any socket - uses fsockopen() or pfsockopen(). More...
Public Member Functions | ||||
__construct ($connectionString, $level=Logger::DEBUG, $bubble=true) | ||||
close () | ||||
We will not close a PersistentSocket instance so it can be reused in other requests. More... | ||||
closeSocket () | ||||
Close socket, if open. More... | ||||
setPersistent ($persistent) | ||||
Set socket connection to nbe persistent. More... | ||||
setConnectionTimeout ($seconds) | ||||
Set connection timeout. More... | ||||
setTimeout ($seconds) | ||||
Set write timeout. More... | ||||
setWritingTimeout ($seconds) | ||||
Set writing timeout. More... | ||||
getConnectionString () | ||||
Get current connection string. More... | ||||
isPersistent () | ||||
Get persistent setting. More... | ||||
getConnectionTimeout () | ||||
Get current connection timeout setting. More... | ||||
getTimeout () | ||||
Get current in-transfer timeout. More... | ||||
getWritingTimeout () | ||||
Get current local writing timeout. More... | ||||
isConnected () | ||||
Check to see if the socket is currently available. More... | ||||
Public Member Functions inherited from Monolog\Handler\AbstractProcessingHandler | ||||
handle (array $record) | ||||
{Handles a record.All records may be passed to this method, and the handler should discard those that it does not want to handle.The return value of this function controls the bubbling process of the handler stack. Unless the bubbling is interrupted (by returning true), the Logger class will keep on calling further handlers in the stack with a given log record.
| ||||
Public Member Functions inherited from Monolog\Handler\AbstractHandler | ||||
__construct ($level=Logger::DEBUG, $bubble=true) | ||||
isHandling (array $record) | ||||
{Checks whether the given record will be handled by this handler.This is mostly done for performance reasons, to avoid calling processors for nothing.Handlers should still check the record levels within handle(), returning false in isHandling() is no guarantee that handle() will not be called, and isHandling() might not be called for a given record.
| ||||
handleBatch (array $records) | ||||
{Handles a set of records at once.
| ||||
close () | ||||
Closes the handler. More... | ||||
pushProcessor ($callback) | ||||
{Adds a processor in the stack.
| ||||
popProcessor () | ||||
{Removes the processor on top of the stack and returns it.
| ||||
setFormatter (FormatterInterface $formatter) | ||||
{Sets the formatter.
| ||||
getFormatter () | ||||
{Gets the formatter.
| ||||
setLevel ($level) | ||||
Sets minimum logging level at which this handler will be triggered. More... | ||||
getLevel () | ||||
Gets minimum logging level at which this handler will be triggered. More... | ||||
setBubble ($bubble) | ||||
Sets the bubbling behavior. More... | ||||
getBubble () | ||||
Gets the bubbling behavior. More... | ||||
__destruct () | ||||
Protected Member Functions | |
write (array $record) | |
Connect (if necessary) and write to the socket. More... | |
pfsockopen () | |
Wrapper to allow mocking. More... | |
fsockopen () | |
Wrapper to allow mocking. More... | |
streamSetTimeout () | |
Wrapper to allow mocking. More... | |
fwrite ($data) | |
Wrapper to allow mocking. More... | |
streamGetMetadata () | |
Wrapper to allow mocking. More... | |
generateDataStream ($record) | |
getResource () | |
Protected Member Functions inherited from Monolog\Handler\AbstractProcessingHandler | |
write (array $record) | |
Writes the record down to the log of the implementing handler. More... | |
processRecord (array $record) | |
Processes a record. More... | |
Protected Member Functions inherited from Monolog\Handler\AbstractHandler | |
getDefaultFormatter () | |
Gets the default formatter. More... | |
Private Member Functions | |
validateTimeout ($value) | |
connectIfNotConnected () | |
connect () | |
createSocketResource () | |
setSocketTimeout () | |
writeToSocket ($data) | |
writingIsTimedOut ($sent) | |
Private Attributes | |
$connectionString | |
$connectionTimeout | |
$resource | |
$timeout = 0 | |
$writingTimeout = 10 | |
$lastSentBytes = null | |
$persistent = false | |
$errno | |
$errstr | |
$lastWritingAt | |
Additional Inherited Members | |
Protected Attributes inherited from Monolog\Handler\AbstractHandler | |
$level = Logger::DEBUG | |
$bubble = true | |
$formatter | |
$processors = array() | |
Stores to any socket - uses fsockopen() or pfsockopen().
Definition at line 22 of file SocketHandler.php.
Monolog\Handler\SocketHandler::__construct | ( | $connectionString, | |
$level = Logger::DEBUG , |
|||
$bubble = true |
|||
) |
string | $connectionString | Socket connection string |
int | $level | The minimum logging level at which this handler will be triggered |
Boolean | $bubble | Whether the messages that are handled can bubble up the stack or not |
Definition at line 40 of file SocketHandler.php.
References Monolog\Handler\AbstractHandler\$bubble, Monolog\Handler\SocketHandler\$connectionString, and Monolog\Handler\AbstractHandler\$level.
Monolog\Handler\SocketHandler::close | ( | ) |
We will not close a PersistentSocket instance so it can be reused in other requests.
Definition at line 65 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\closeSocket(), and Monolog\Handler\SocketHandler\isPersistent().
Monolog\Handler\SocketHandler::closeSocket | ( | ) |
Close socket, if open.
Definition at line 75 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\close(), Monolog\Handler\FleepHookHandler\write(), Monolog\Handler\FlowdockHandler\write(), Monolog\Handler\PushoverHandler\write(), Monolog\Handler\HipChatHandler\write(), Monolog\Handler\SlackHandler\write(), and Monolog\Handler\SocketHandler\writingIsTimedOut().
|
private |
Definition at line 267 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\createSocketResource(), and Monolog\Handler\SocketHandler\setSocketTimeout().
Referenced by Monolog\Handler\SocketHandler\connectIfNotConnected().
|
private |
Definition at line 246 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\connect(), and Monolog\Handler\SocketHandler\isConnected().
Referenced by Monolog\Handler\SocketHandler\write().
|
private |
Definition at line 273 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\$resource, Monolog\Handler\SocketHandler\fsockopen(), Monolog\Handler\SocketHandler\isPersistent(), and Monolog\Handler\SocketHandler\pfsockopen().
Referenced by Monolog\Handler\SocketHandler\connect().
|
protected |
Wrapper to allow mocking.
Definition at line 204 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\createSocketResource().
|
protected |
Wrapper to allow mocking.
Definition at line 225 of file SocketHandler.php.
References $data.
Referenced by Monolog\Handler\SocketHandler\writeToSocket().
|
protected |
Definition at line 254 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\write().
Monolog\Handler\SocketHandler::getConnectionString | ( | ) |
Get current connection string.
Definition at line 135 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\$connectionString.
Monolog\Handler\SocketHandler::getConnectionTimeout | ( | ) |
Get current connection timeout setting.
Definition at line 155 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\$connectionTimeout.
|
protected |
Definition at line 262 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\$resource.
Referenced by Monolog\Handler\SlackHandler\write().
Monolog\Handler\SocketHandler::getTimeout | ( | ) |
Get current in-transfer timeout.
Definition at line 165 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\$timeout.
Monolog\Handler\SocketHandler::getWritingTimeout | ( | ) |
Get current local writing timeout.
Definition at line 175 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\$writingTimeout.
Monolog\Handler\SocketHandler::isConnected | ( | ) |
Check to see if the socket is currently available.
UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details.
Definition at line 187 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\connectIfNotConnected(), and Monolog\Handler\SocketHandler\writeToSocket().
Monolog\Handler\SocketHandler::isPersistent | ( | ) |
Get persistent setting.
Definition at line 145 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\$persistent.
Referenced by Monolog\Handler\SocketHandler\close(), and Monolog\Handler\SocketHandler\createSocketResource().
|
protected |
Wrapper to allow mocking.
Definition at line 196 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\createSocketResource().
Monolog\Handler\SocketHandler::setConnectionTimeout | ( | $seconds | ) |
Set connection timeout.
Only has effect before we connect.
float | $seconds |
Definition at line 100 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\validateTimeout().
Monolog\Handler\SocketHandler::setPersistent | ( | $persistent | ) |
Set socket connection to nbe persistent.
It only has effect before the connection is initiated.
bool | $persistent |
Definition at line 88 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\$persistent.
|
private |
Definition at line 286 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\streamSetTimeout().
Referenced by Monolog\Handler\SocketHandler\connect().
Monolog\Handler\SocketHandler::setTimeout | ( | $seconds | ) |
Set write timeout.
Only has effect before we connect.
float | $seconds |
Definition at line 113 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\validateTimeout().
Monolog\Handler\SocketHandler::setWritingTimeout | ( | $seconds | ) |
Set writing timeout.
Only has effect during connection in the writing cycle.
float | $seconds | 0 for no timeout |
Definition at line 124 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\validateTimeout().
|
protected |
Wrapper to allow mocking.
Definition at line 233 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\writeToSocket().
|
protected |
Wrapper to allow mocking.
Definition at line 214 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\setSocketTimeout().
|
private |
Definition at line 238 of file SocketHandler.php.
References $ok.
Referenced by Monolog\Handler\SocketHandler\setConnectionTimeout(), Monolog\Handler\SocketHandler\setTimeout(), and Monolog\Handler\SocketHandler\setWritingTimeout().
|
protected |
Connect (if necessary) and write to the socket.
array | $record |
Definition at line 55 of file SocketHandler.php.
References $data, Monolog\Handler\SocketHandler\connectIfNotConnected(), Monolog\Handler\SocketHandler\generateDataStream(), and Monolog\Handler\SocketHandler\writeToSocket().
|
private |
Definition at line 293 of file SocketHandler.php.
References $data, Monolog\Handler\SocketHandler\fwrite(), Monolog\Handler\SocketHandler\isConnected(), Monolog\Handler\SocketHandler\streamGetMetadata(), and Monolog\Handler\SocketHandler\writingIsTimedOut().
Referenced by Monolog\Handler\SocketHandler\write().
|
private |
Definition at line 322 of file SocketHandler.php.
References Monolog\Handler\SocketHandler\$writingTimeout, Monolog\Handler\SocketHandler\closeSocket(), and time.
Referenced by Monolog\Handler\SocketHandler\writeToSocket().
|
private |
Definition at line 24 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\__construct(), Monolog\Handler\FleepHookHandler\__construct(), Monolog\Handler\PushoverHandler\__construct(), Monolog\Handler\HipChatHandler\__construct(), and Monolog\Handler\SocketHandler\getConnectionString().
|
private |
Definition at line 25 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\getConnectionTimeout().
|
private |
Definition at line 31 of file SocketHandler.php.
|
private |
Definition at line 32 of file SocketHandler.php.
|
private |
Definition at line 29 of file SocketHandler.php.
|
private |
Definition at line 33 of file SocketHandler.php.
|
private |
Definition at line 30 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\isPersistent(), and Monolog\Handler\SocketHandler\setPersistent().
|
private |
Definition at line 26 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\createSocketResource(), and Monolog\Handler\SocketHandler\getResource().
|
private |
Definition at line 27 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\getTimeout().
|
private |
Definition at line 28 of file SocketHandler.php.
Referenced by Monolog\Handler\SocketHandler\getWritingTimeout(), and Monolog\Handler\SocketHandler\writingIsTimedOut().