mirror of
https://github.com/Seldaek/monolog.git
synced 2025-07-31 02:10:22 +02:00
Pull in mlehner/gelf-php via Composer
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
||||
vendor
|
||||
composer.phar
|
||||
phpunit.xml
|
@@ -19,10 +19,18 @@
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/mlehner/gelf-php"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/msabramo/gelf-php-1"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/msabramo/gelf-php"
|
||||
}
|
||||
],
|
||||
"suggest": {
|
||||
"gelf-php": ">=0"
|
||||
"mlehner/gelf-php": "dev-add-composer-support"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {"Monolog": "src/"}
|
||||
|
11
composer.lock
generated
Normal file
11
composer.lock
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"hash": "5715c4c52bc66b23002954fb3a2f47e4",
|
||||
"packages": [
|
||||
{
|
||||
"package": "mlehner/gelf-php",
|
||||
"version": "dev-add-composer-support",
|
||||
"source-reference": "39419c2b75daf6b9eb9feb6ac0541807ee888cda"
|
||||
}
|
||||
],
|
||||
"aliases": []
|
||||
}
|
@@ -11,14 +11,15 @@
|
||||
|
||||
namespace Monolog\Handler;
|
||||
|
||||
use Monolog\TestCase;
|
||||
use Monolog\Logger;
|
||||
use Gelf\MessagePublisher;
|
||||
|
||||
class GelfHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
class GelfHandlerTest extends TestCase
|
||||
{
|
||||
public function setUp()
|
||||
{
|
||||
if (!class_exists("MessagePublisher"))
|
||||
if (!class_exists("Gelf\MessagePublisher"))
|
||||
{
|
||||
$this->markTestSkipped("https://github.com/mlehner/gelf-php not installed");
|
||||
}
|
||||
@@ -35,6 +36,14 @@ class GelfHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
protected function getMessagePublisher()
|
||||
{
|
||||
return new MessagePublisher();
|
||||
return new MessagePublisher('localhost');
|
||||
}
|
||||
|
||||
public function testStuff()
|
||||
{
|
||||
$handler = new GelfHandler($this->getMessagePublisher());
|
||||
$handler->setFormatter($this->getIdentityFormatter());
|
||||
$handler->handle($this->getRecord(Logger::DEBUG));
|
||||
$handler->handle($this->getRecord(Logger::WARNING));
|
||||
}
|
||||
}
|
||||
|
@@ -9,6 +9,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
require_once __DIR__ . "/../vendor/.composer/autoload.php";
|
||||
require_once __DIR__.'/Monolog/TestCase.php';
|
||||
|
||||
spl_autoload_register(function($class)
|
||||
|
Reference in New Issue
Block a user