From 1d85837e797b4335c5791fa8cef373a601732b7e Mon Sep 17 00:00:00 2001 From: hotyue <52734432+hotyue@users.noreply.github.com> Date: Tue, 14 Apr 2026 08:00:40 +0000 Subject: [PATCH] =?UTF-8?q?feat(core):=20=F0=9F=93=8D=20Google=20=E5=85=BB?= =?UTF-8?q?=E6=8A=A4=E6=A8=A1=E5=9D=97=E6=97=A5=E5=BF=97=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E5=AF=B9=E9=BD=90=20v3.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/mod_google.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/mod_google.sh b/core/mod_google.sh index 02f93eb..e96a0e5 100755 --- a/core/mod_google.sh +++ b/core/mod_google.sh @@ -1,7 +1,7 @@ #!/bin/bash # ========================================================== -# 脚本名称: mod_google.sh (Google 业务逻辑模块) +# 脚本名称: mod_google.sh (Google 业务逻辑模块 v3.4.0 版本锚点版) # 核心功能: 执行坐标微抖动、模拟真实阅读时长、会话行为拉伸 # ========================================================== @@ -16,11 +16,15 @@ else exit 1 fi -# 容错机制:如果父进程没有传递 log 函数,则本地定义一个作为 fallback +# 容错机制:如果父进程没有传递 log 函数,则本地定义一个作为 fallback (v3.4.0 引入版本探针) if ! type log >/dev/null 2>&1; then log() { + # [v3.4.0 核心] 提取当前配置中的版本锚点 + local local_ver="${AGENT_VERSION:-未知}" + mkdir -p "${INSTALL_DIR}/logs" - printf "[$(date '+%Y-%m-%d %H:%M:%S')] [%-5s] [%-7s] [%s] %s\n" "$2" "$1" "$REGION_CODE" "$3" >> "${INSTALL_DIR}/logs/sentinel.log" + # 统一日志格式,注入 [版本号] 追踪标识 + printf "[$(date '+%Y-%m-%d %H:%M:%S')] [v%-5s] [%-5s] [%-7s] [%s] %s\n" "$local_ver" "$2" "$1" "$REGION_CODE" "$3" >> "${INSTALL_DIR}/logs/sentinel.log" } fi