From cecbe3970b26333ac300050e490f6339872d195c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9D=99?= Date: Fri, 25 Feb 2022 15:23:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BE=AE=E4=BF=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=9B=9E=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Http/Controllers/WxpayController.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/Endpoint/Callback/Http/Controllers/WxpayController.php b/app/Endpoint/Callback/Http/Controllers/WxpayController.php index 62e610da..e22cff92 100644 --- a/app/Endpoint/Callback/Http/Controllers/WxpayController.php +++ b/app/Endpoint/Callback/Http/Controllers/WxpayController.php @@ -11,6 +11,7 @@ use App\Services\PayService; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Log; use Throwable; class WxpayController extends Controller @@ -93,4 +94,19 @@ class WxpayController extends Controller return true; }); } + + /** + * 微信回调日志 + * + * @param string $message + * @param array $context + * @return void + */ + protected function log(string $message, array $context = []) + { + return Log::build([ + 'driver' => 'daily', + 'path' => storage_path('logs/wxpay-notify.log'), + ])->info($message, $context); + } }