Skip to content

fredericbarrau/gelf-php

 
 

Repository files navigation

gelf-php

Build Status

PHP classes to send GELF (Graylog extended log format) messages

Issue tracker: JIRA gelf-php

Author

Lennart Koopman

See the list of contributors

Example

<?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);

Releases

No releases published

Packages

No packages published