diff --git a/src/Log/Engine/CloudwatchLog.php b/src/Log/Engine/CloudwatchLog.php index e188d8e..87c2231 100644 --- a/src/Log/Engine/CloudwatchLog.php +++ b/src/Log/Engine/CloudwatchLog.php @@ -21,13 +21,15 @@ class CloudwatchLog extends BaseLog // aws 'aws' => [ - 'region' => 'eu-central-1', +/** + 'region' => env('AWS_DEFAULT_REGION', 'eu-central-1'), 'version' => 'latest', 'credentials' => [ 'key' => 'your AWS key', 'secret' => 'your AWS secret', //'token' => 'your AWS session token', ] +*/ ] ]; @@ -68,7 +70,10 @@ public function logger($level) public function log($level, $message, array $context = []) { - $this->logger($level)->log($level, $message, $context); + $message = $this->_format($message, $context); + $output = date('Y-m-d H:i:s') . ' ' . ucfirst($level) . ': ' . $message . "\n"; + + $this->logger($level)->log($level, $output, $context); return true; } }