PHP classes to send GELF (Graylog extended log format) messages
Issue tracker: JIRA gelf-php
<?php
require('GELFMessage.php');
require('GELFMessagePublisher.php');
$message = new GELFMessage();
$message->setShortMessage('something is broken.');
$message->setFullMessage("lol full message!");
$message->setHost('somehost');
$message->setLevel(GELFMessage::CRITICAL);
$message->setFile('/var/www/example.php');
$message->setLine(1337);
$message->setAdditional("something", "foo");
$message->setAdditional("something_else", "bar");
$publisher = new GELFMessagePublisher('172.16.22.30');
$publisher->publish($message);