feat: complete logging audit - fill all gaps
- Filter noisy audio play() errors from frontend log - Add logging to ALL 8 ToBet services (was only Baccarat) - Add InitTableService logging (Sumday/Boot/NumberTab creation & failure) - Add logview.sh for quick log viewing - Add log_cleanup.sh for 30-day rotation
This commit is contained in:
@@ -7,6 +7,7 @@ namespace app\services\connect;
|
||||
use app\models\process\Boot;
|
||||
use app\models\process\NumberTab;
|
||||
use app\models\process\Sumday;
|
||||
use app\utils\Logger;
|
||||
|
||||
/**
|
||||
* TODO 桌子状态服务
|
||||
@@ -22,15 +23,24 @@ class InitTableService
|
||||
*/
|
||||
public static function initTable(array $tableInfo): array
|
||||
{
|
||||
//查询日结
|
||||
$lastSumday = Sumday::getByTableIdOrderByIdDesc($tableInfo);
|
||||
if (!$lastSumday) $lastSumday = Sumday::addByTable($tableInfo);
|
||||
//查询靴
|
||||
if (!$lastSumday) {
|
||||
$lastSumday = Sumday::addByTable($tableInfo);
|
||||
Logger::info(Logger::CAT_GAME, 'init_create_sumday', ['table_id' => $tableInfo['id']]);
|
||||
}
|
||||
$lastBoot = Boot::getByTableIdOrderByIdDesc($tableInfo);
|
||||
if (!$lastBoot) $lastBoot = Boot::addBySumday($lastSumday);
|
||||
//查询铺
|
||||
if (!$lastBoot) {
|
||||
$lastBoot = Boot::addBySumday($lastSumday);
|
||||
Logger::info(Logger::CAT_GAME, 'init_create_boot', ['table_id' => $tableInfo['id'], 'sumday_id' => $lastSumday['id'] ?? '']);
|
||||
}
|
||||
$lastNumberTab = NumberTab::getByBootIdOrderByIdDesc($lastBoot);
|
||||
if (!$lastNumberTab) $lastNumberTab = NumberTab::addByBoot($lastBoot);
|
||||
if (!$lastNumberTab) {
|
||||
$lastNumberTab = NumberTab::addByBoot($lastBoot);
|
||||
Logger::info(Logger::CAT_GAME, 'init_create_number_tab', ['table_id' => $tableInfo['id'], 'boot_id' => $lastBoot['id'] ?? '']);
|
||||
}
|
||||
if (!$lastNumberTab) {
|
||||
Logger::error(Logger::CAT_GAME, 'init_table_fail', ['table_id' => $tableInfo['id'], 'table_name' => $tableInfo['table_name'] ?? '']);
|
||||
}
|
||||
return $lastNumberTab;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user