|
|
@@ -4,11 +4,17 @@ declare(strict_types=1);
|
|
|
namespace SixShop\System;
|
|
|
|
|
|
use think\App;
|
|
|
+use think\event\HttpEnd;
|
|
|
|
|
|
class Log extends \think\Log
|
|
|
{
|
|
|
public function __construct(App $app, private ExtensionManager $extensionManager, private string $extensionID)
|
|
|
{
|
|
|
+ if (!$app->runningInConsole()) {
|
|
|
+ $app->event->listen(HttpEnd::class, function () {
|
|
|
+ $this->save();
|
|
|
+ });
|
|
|
+ }
|
|
|
parent::__construct($app);
|
|
|
}
|
|
|
|