Merge pull request #10948 from annando/logger-json
Improve the JSON output of the log entries
This commit is contained in:
commit
72a500ea08
|
@ -129,7 +129,7 @@ abstract class AbstractLogger implements LoggerInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return @json_encode($output);
|
return @json_encode($output, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -157,7 +157,7 @@ abstract class AbstractLoggerTest extends MockedTest
|
||||||
|
|
||||||
self::assertLogline($text);
|
self::assertLogline($text);
|
||||||
|
|
||||||
self::assertStringContainsString(@json_encode($context), $text);
|
self::assertStringContainsString(@json_encode($context, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -176,7 +176,7 @@ abstract class AbstractLoggerTest extends MockedTest
|
||||||
|
|
||||||
self::assertLogline($text);
|
self::assertLogline($text);
|
||||||
|
|
||||||
self::assertStringContainsString(@json_encode($assertion), $this->getContent());
|
self::assertStringContainsString(@json_encode($assertion, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), $this->getContent());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testNoObjectHandling()
|
public function testNoObjectHandling()
|
||||||
|
|
Loading…
Reference in a new issue