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:
@@ -2,9 +2,24 @@
|
||||
var reportUrl = '/log/report';
|
||||
var queue = [];
|
||||
var sending = false;
|
||||
var ignorePatterns = [
|
||||
'play() request was interrupted',
|
||||
'The play() request was interrupted',
|
||||
'NotAllowedError',
|
||||
'AbortError'
|
||||
];
|
||||
|
||||
function shouldIgnore(msg) {
|
||||
if (!msg) return false;
|
||||
for (var i = 0; i < ignorePatterns.length; i++) {
|
||||
if (msg.indexOf(ignorePatterns[i]) !== -1) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function send(data) {
|
||||
if (queue.length >= 10) return;
|
||||
if (shouldIgnore(data.message)) return;
|
||||
data.source = 'handle';
|
||||
data.time = new Date().toISOString();
|
||||
data.url = location.href;
|
||||
|
||||
Reference in New Issue
Block a user