This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lennart Koopmann
committed
Dec 19, 2013
1 parent
6e47c56
commit 9765020
Showing
1 changed file
with
1 addition
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1 @@ | ||
# gelf-php | ||
|
||
[![Build Status](https://secure.travis-ci.org/Graylog2/gelf-php.png?branch=master)](http://travis-ci.org/Graylog2/gelf-php) | ||
|
||
PHP classes to send [GELF (Graylog extended log format)](http://www.graylog2.org/about/gelf) messages | ||
|
||
Issue tracker: [JIRA gelf-php](http://jira.graylog2.org/browse/GELFPHP) | ||
|
||
## Author | ||
|
||
[Lennart Koopman](https://github.com/lennartkoopmann) | ||
|
||
See [the list of contributors](https://github.com/Graylog2/gelf-php/contributors) | ||
|
||
|
||
## Example | ||
|
||
```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); | ||
``` | ||
# This library is deprecated. Find the new official GELF library [here](https://github.com/bzikarsky/gelf-php). |