-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
问题描述
在 StoreService.swift 中发现多处使用 print() 而非系统日志框架的情况。
发现的问题
文件: CisumApp/Core/Seivces/StoreService/StoreService.swift
使用 print() 的位置:
print("检查订阅状态")
print("products.subscriptions 是空的")
print("statuses 是空的,表示对于当前订阅组,没有订阅状态")
print("检查订阅状态 -> Subscribed")问题分析
- 生产环境使用
print()无法控制日志级别 - 日志无法被系统日志收集
- 无法在发布版本中关闭
- 影响性能(尤其是在频繁调用的代码中)
建议
- 使用项目中已有的
OSLog框架 - 或使用项目自定义的
SuperLog协议 - 将日志级别设为
debug或info,便于在发布版本中过滤
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working