1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-11 15:44:34 +02:00

Merge branch '2.x'

This commit is contained in:
Jordi Boggiano
2022-07-22 16:50:53 +02:00
4 changed files with 76 additions and 7 deletions

View File

@@ -141,6 +141,14 @@ class LineFormatterTest extends TestCase
$this->assertMatchesRegularExpression('{^\['.date('Y-m-d').'] core\.CRITICAL: foobar \{"exception":"\[object] \(RuntimeException\(code: 0\): Foo at '.preg_quote(substr($path, 1, -1)).':'.(__LINE__ - 5).'\)\n\[stacktrace]\n#0}', $message);
}
public function testInlineLineBreaksRespectsEscapedBackslashes()
{
$formatter = new LineFormatter(null, 'Y-m-d');
$formatter->allowInlineLineBreaks();
self::assertSame('{"test":"foo'."\n".'bar\\\\name-with-n"}', $formatter->stringify(["test" => "foo\nbar\\name-with-n"]));
}
public function testDefFormatWithExceptionAndStacktraceParserFull()
{
$formatter = new LineFormatter(null, 'Y-m-d');