SLS软删除支持丰富的查询条件,可以实现精准的日志匹配。支持的查询条件包括:
- 数值范围匹配:如
version>=2.1 and version < 2.3 - 文本关键词匹配:如
error_code:500 - 多条件组合:使用
and、or逻辑运算符组合多个条件 - Tag标签匹配:如
__tag__:__path__: "/user/actiontrail.LOG" - 通配符匹配:如
phoneNumber:*
例如清理特定版本的异常日志,可以构造复合查询条件:version>=2.1 and version < 2.3 and __tag__:__path__: "/user/actiontrail.LOG" and (error_code:500 or error_code:502) and event_type:file_upload_error。这种灵活的查询能力使得软删除可以精准定位并清除目标日志,而不影响其他正常数据。