分类目录归档:错误分析

Xcode8运行时的一些log日志是怎么回事

1、升级Xcode8之后,原项目运行时在控制台多出了一些日志信息,如下所示:

1
2
3
4
5
2016-09-18 15:38:17.290635 Test[1243:287383] subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-18 15:38:17.293846 Test[1243:287383] subsystem: com.apple.UIKit, category: HIDEventIncoming, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-18 15:38:17.304381 Test[1243:287378] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0
2016-09-18 15:38:17.324387 Test[1243:287071] subsystem: com.apple.UIKit, category: StatusBar, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-09-18 15:38:17.495029 Test[1243:287071] subsystem: com.apple.BackBoardServices.fence, category: App, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0

2、在网上找了一些资料,目前还没细研究是怎么回事,但有办法取消日志输出,具体操作是Product–>Scheme–>Edit Scheme…

3、在Run的Enviroment Variables中添加Name为OS_ACTIVITY_MODE的键,值为Disable,前面要记得勾选哦。如下图所示

%e5%b1%8f%e5%b9%95%e5%bf%ab%e7%85%a7-2016-09-18-%e4%b8%8b%e5%8d%883-37-30