From 86557181d3f564e952ee6b57a11c2297213de6b0 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 7 Jun 2024 14:04:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=96=B9=E5=BC=8F=E5=8F=8A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E7=B4=A2=E5=BC=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store_branch_product/StoreBranchProductLists.php | 2 +- app/api/controller/IndexController.php | 5 ++++- config/log.php | 4 ++-- config/plugin/webman/redis-queue/log.php | 2 +- support/log/MonologExtendHandler.php | 8 ++------ 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/admin/lists/store_branch_product/StoreBranchProductLists.php b/app/admin/lists/store_branch_product/StoreBranchProductLists.php index df8ad395d..4e2cf97f9 100644 --- a/app/admin/lists/store_branch_product/StoreBranchProductLists.php +++ b/app/admin/lists/store_branch_product/StoreBranchProductLists.php @@ -66,7 +66,7 @@ class StoreBranchProductLists extends BaseAdminDataLists implements ListsSearchI ->order(['sort' => 'desc', 'id' => 'desc']) ->select() ->each(function ($item) { - $item['store_name']=SystemStore::where('id',$item['store_id'])->value('name'); + $item['system_store_name']=SystemStore::where('id',$item['store_id'])->value('name'); $item['unit_name'] = StoreProductUnit::where('id', $item['unit'])->value('name'); $item['cate_name'] = StoreCategory::where('id', $item['cate_id'])->value('name'); return $item; diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index a522a1833..d74c77218 100644 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -12,8 +12,9 @@ use support\Cache; use think\facade\Db; use Webman\Config; use hg\apidoc\annotation as ApiDoc; +use support\Log; use Yansongda\Pay\Exception\InvalidSignException; - +use Monolog\Handler\RotatingFileHandler; #[ApiDoc\NotParse()] class IndexController extends BaseApiController @@ -22,6 +23,8 @@ class IndexController extends BaseApiController public function index() { + Log::error(222); +d(2); try { $wechat = new PayService(1); diff --git a/config/log.php b/config/log.php index 7c9a8824f..31fdf9677 100644 --- a/config/log.php +++ b/config/log.php @@ -16,9 +16,9 @@ return [ 'default' => [ 'handlers' => [ [ - 'class' => \support\log\MonologExtendHandler::class, + 'class' => Monolog\Handler\RotatingFileHandler::class, 'constructor' => [ - null, + runtime_path() . '/logs/'.date('Ym').'/.log', 2048, Monolog\Logger::DEBUG, true, diff --git a/config/plugin/webman/redis-queue/log.php b/config/plugin/webman/redis-queue/log.php index cd6ca51f2..4a60c18f7 100644 --- a/config/plugin/webman/redis-queue/log.php +++ b/config/plugin/webman/redis-queue/log.php @@ -18,7 +18,7 @@ return [ [ 'class' => \support\log\MonologExtendHandler::class, 'constructor' => [ - runtime_path() . '/logs/redis-queue/queue.log', + '/logs/redis-queue/queue.log', 7, //$maxFiles Monolog\Logger::DEBUG, ], diff --git a/support/log/MonologExtendHandler.php b/support/log/MonologExtendHandler.php index 82217d1f3..5aec547af 100644 --- a/support/log/MonologExtendHandler.php +++ b/support/log/MonologExtendHandler.php @@ -1,15 +1,11 @@