1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 21:26:43 +02:00

Use facility additional value and not channel to be compat with existing Monolog 3 code

This commit is contained in:
Jordi Boggiano
2022-08-20 15:05:05 +02:00
parent 6bf3b35b80
commit 6a28e9d41a
3 changed files with 6 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ class GelfMessageFormatterTest extends TestCase
$this->assertEquals(null, $message->getLine());
$this->assertEquals(null, $message->getFile());
} else {
$this->assertEquals('meh', $message->getAdditional('channel'));
$this->assertEquals('meh', $message->getAdditional('facility'));
}
$this->assertEquals($this->isLegacy() ? 3 : 'error', $message->getLevel());
$this->assertNotEmpty($message->getHost());
@@ -172,7 +172,7 @@ class GelfMessageFormatterTest extends TestCase
$this->assertEquals("/some/file/in/dir.php", $message->getFile());
$this->assertEquals("56", $message->getLine());
} else {
$this->assertEquals(['channel' => 'meh', 'ctxt_exception' => '{"class":"\\\\Exception","file":"/some/file/in/dir.php:56","trace":["/some/file/1.php:23","/some/file/2.php:3"]}'], $message->getAllAdditionals());
$this->assertEquals(['facility' => 'meh', 'ctxt_exception' => '{"class":"\\\\Exception","file":"/some/file/in/dir.php:56","trace":["/some/file/1.php:23","/some/file/2.php:3"]}'], $message->getAllAdditionals());
}
}