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 @@