From a0f1752c7fcdbd89fee17aeee784b083f7d9585f Mon Sep 17 00:00:00 2001 From: Mohamad Haddad Date: Sun, 6 Oct 2019 19:41:02 +0300 Subject: [PATCH] Enhancement: Use AWS suggested LineFormatter attributes (#71) * Enhancement: Use AWS suggested LineFormatter attributes * Adding spaces after attributes --- src/Handler/CloudWatch.php | 2 +- tests/Handler/CloudWatchTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Handler/CloudWatch.php b/src/Handler/CloudWatch.php index 8572136..66c6ec7 100755 --- a/src/Handler/CloudWatch.php +++ b/src/Handler/CloudWatch.php @@ -366,7 +366,7 @@ function ($stream) { */ protected function getDefaultFormatter() { - return new LineFormatter("%level_name%: %message% %context% %extra%\n"); + return new LineFormatter("%channel%: %level_name%: %message% %context% %extra%", null, false, true); } /** diff --git a/tests/Handler/CloudWatchTest.php b/tests/Handler/CloudWatchTest.php index e7dee8b..d2bb760 100644 --- a/tests/Handler/CloudWatchTest.php +++ b/tests/Handler/CloudWatchTest.php @@ -297,7 +297,7 @@ public function testFormatter() $formatter = $handler->getFormatter(); - $expected = new LineFormatter("%level_name%: %message% %context% %extra%\n"); + $expected = new LineFormatter("%channel%: %level_name%: %message% %context% %extra%", null, false, true); $this->assertEquals($expected, $formatter); }