Download the PHP package giacomofurlan/php-graylog-gelf without Composer
On this page you can find all versions of the php package giacomofurlan/php-graylog-gelf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-graylog-gelf
PHP GELF logger
This library aims to help the developer with both a PSR-3 compliant and a custom (extended) logger to send data to Graylog 2 via the Graylog Extended Log Format.
Class information
GiacomoFurlan\Graylog\GELFLogger
It implements the Psr\Log\LoggerInterface interface, so use it as a standard logger.
It can set the short message, the context and the log level.
GiacomoFurlan\Graylog\ExtendedGELFLogger
It extends the previous class, but add gelf*
functions to send more complex information.
It also allows the logs to be enqueued, rather than being sent immediately.
gelfLog
gelfAlert
gelfCritical
gelfDebug
gelfEmergency
gelfError
gelfInfo
gelfNotice
gelfWarning
flush
These function accept a GELF object and the possibility to flush the messages instantly (default true).
The flush
function flushes eventual messages previously enqueued.
GiacomoFurlan\Graylog\GELF
A data-transfer object used by ExtendedGELFLogger
. It allows to set the short and full messages, to overwrite
the host
information and to add variables to the context.
GiacomoFurlan\Graylog\UDPWriter
UDP implementation of the WriterInterface
used to instantiate the loggers.
If there are enqueued messages (writing with flush
set to false
, changeable using the extended logger),
it will try to run flush
when destroyed.
GiacomoFurlan\Graylog\TCPWriter
UDP implementation of the WriterInterface
used to instantiate the loggers.
If there are enqueued messages (writing with flush
set to false
, changeable using the extended logger),
it will try to run flush
when destroyed.
GiacomoFurlan\Graylog\GELFException
It can be thrown trying to send the information.
- Code
GELFException::CODE_MISSING_HOST
: the host is's not set or empty - Code
GELFException::CODE_CANT_SEND_MESSAGE
: an error occurred trying to send the packet
More information may be gathered reading the exception's message.