Свойство | Type | Description | |
---|---|---|---|
$chunkSize | integer | ||
$hostname | string | ||
$port | integer | ||
$streamSocketClient | resource |
Méthode | Description | |
---|---|---|
__construct ( string $hostname, integer $port = self::GRAYLOG2_DEFAULT_PORT, integer $chunkSize = self::CHUNK_SIZE_WAN ) | Creates a new publisher that sends errors to a Graylog2 server via UDP | |
publish ( GELFMessage $message ) : boolean | Publishes a GELFMessage, returns false if an error occured during write |
Méthode | Description | |
---|---|---|
getMessageChunks ( string $preparedMessage ) : array | ||
getMessageId ( ) : float | ||
getPreparedMessage ( GELFMessage $message ) : string | ||
getSocketConnection ( ) : resource | ||
isMessageSizeGreaterChunkSize ( string $preparedMessage ) : boolean | ||
prependChunkInformation ( float $messageId, string $data, integer $sequence, integer $sequenceSize ) : string | ||
writeMessageChunkToSocket ( resource $socket, float $messageId, string $messageChunk, integer $messageChunkIndex, integer $messageChunksCount ) : integer | boolean | ||
writeMessageToSocket ( resource $socket, string $preparedMessage ) : integer | boolean |
protected getMessageChunks ( string $preparedMessage ) : array | ||
$preparedMessage | string | |
Résultat | array |
protected getPreparedMessage ( GELFMessage $message ) : string | ||
$message | GELFMessage | |
Résultat | string |
protected getSocketConnection ( ) : resource | ||
Résultat | resource |
protected isMessageSizeGreaterChunkSize ( string $preparedMessage ) : boolean | ||
$preparedMessage | string | |
Résultat | boolean |
protected writeMessageChunkToSocket ( resource $socket, float $messageId, string $messageChunk, integer $messageChunkIndex, integer $messageChunksCount ) : integer | boolean | ||
$socket | resource | |
$messageId | float | |
$messageChunk | string | |
$messageChunkIndex | integer | |
$messageChunksCount | integer | |
Résultat | integer | boolean |