mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2025-12-21 22:38:35 +00:00
feat(core): 增强日志记录和错误处理功能
- 更新日志记录机制,将日志文件存储在程序根目录下的log文件夹中,并使用日期+时间戳格式命名。 - 在多个模块中添加详细的错误处理逻辑,确保在发生异常时能够记录相关信息,便于后续排查。 - 优化UI管理器中的日志文件打开功能,增加对日志文件存在性和大小的检查,提升用户体验。 - 在下载管理器和补丁管理器中增强调试信息的记录,确保在关键操作中提供更清晰的反馈。
This commit is contained in:
@@ -9,9 +9,25 @@ def censor_url(text):
|
||||
Returns:
|
||||
str: 处理后的文本,URL被完全隐藏
|
||||
"""
|
||||
# 临时禁用URL隐藏功能,直接返回原始文本以便调试
|
||||
if not isinstance(text, str):
|
||||
text = str(text)
|
||||
|
||||
return text # 直接返回原始文本,不做任何隐藏
|
||||
|
||||
# 以下是原始代码,现在被注释掉
|
||||
'''
|
||||
# 匹配URL并替换为固定文本
|
||||
url_pattern = re.compile(r'https?://[^\s/$.?#].[^\s]*')
|
||||
return url_pattern.sub('***URL protection***', text)
|
||||
censored = url_pattern.sub('***URL protection***', text)
|
||||
|
||||
# 额外处理带referer参数的情况
|
||||
referer_pattern = re.compile(r'--referer\s+(\S+)')
|
||||
censored = referer_pattern.sub('--referer ***URL protection***', censored)
|
||||
|
||||
# 处理Origin头
|
||||
origin_pattern = re.compile(r'Origin:\s+(\S+)')
|
||||
censored = origin_pattern.sub('Origin: ***URL protection***', censored)
|
||||
|
||||
return censored
|
||||
'''
|
||||
Reference in New Issue
Block a user