Property | Type | Description | |
---|---|---|---|
$chunkSize | integer | ||
$hostname | string | ||
$port | integer | ||
$streamSocketClient | resource |
Method | 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 |
Method | 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 | |
return | array |
protected getPreparedMessage ( GELFMessage $message ) : string | ||
$message | GELFMessage | |
return | string |
protected isMessageSizeGreaterChunkSize ( string $preparedMessage ) : boolean | ||
$preparedMessage | string | |
return | 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 | |
return | integer | boolean |