From 72818ddbbf8647fea34c1de9f165fd206c446176 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Wed, 9 Mar 2022 19:07:44 +0800 Subject: [PATCH] cleanup cli log add REQUEST_ID --- app/Console/Commands/Test.php | 6 ++---- include/cleanup.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Console/Commands/Test.php b/app/Console/Commands/Test.php index 6804797c..1431e548 100644 --- a/app/Console/Commands/Test.php +++ b/app/Console/Commands/Test.php @@ -62,10 +62,8 @@ class Test extends Command */ public function handle() { - $r = Tag::query()->paginate(); - $resource = TagResource::collection($r); - dd($resource->response()->getData(true)); - echo $r->updated_at; + $r = urldecode('%E8%8E%B7%E5%8F%96%E7%A8%8B%E5%BA%8F'); + echo $r; } } diff --git a/include/cleanup.php b/include/cleanup.php index e4788969..f472a5cb 100644 --- a/include/cleanup.php +++ b/include/cleanup.php @@ -6,7 +6,7 @@ die('Hacking attempt!'); function printProgress($msg) { $br = php_sapi_name() == 'cli' ? "\n" : "
"; - echo sprintf("[%s] %s ... done!%s", date('Y-m-d H:i:s'), $msg, $br); + echo sprintf("[%s] [%s] %s ... done!%s", date('Y-m-d H:i:s'), REQUEST_ID, $msg, $br); } function torrent_promotion_expire($days, $type = 2, $targettype = 1){