如何关闭 xcode 8 疯狂的日志log输出

版权声明:本文为博主原创文章,转载请注明来源(http://blog.csdn.net/ruglcc) https://blog.csdn.net/ruglcc/article/details/52820116

问题引出

xcode 8调试网络应用时,出现如下错误一些tcp的访问的提示:

2016-10-15 00:08:51.511185 icharge[84043:1769493] [] nw_resolver_create_dns_service_on_queue Starting host resolution www.baidu.com:0, flags 0x4000d000

2016-10-15 00:08:51.512079 icharge[84043:1769612] [] nw_resolver_host_resolve_callback flags=0x3 ifindex=0 error=NoSuchRecord(-65554) hostname=www.baidu.com. addr=::.0 ttl=60

2016-10-15 00:08:51.512948 icharge[84043:1769612] [] nw_resolver_host_resolve_callback flags=0x3 ifindex=0 error=NoError(0) hostname=www.a.shifen.com. addr=220.181.112.244:0 ttl=354

2016-10-15 00:08:51.513914 icharge[84043:1769612] [] nw_resolver_host_resolve_callback flags=0x2 ifindex=0 error=NoError(0) hostname=www.a.shifen.com. addr=220.181.111.188:0 ttl=354


2016-10-15 00:08:51.599797 icharge[84043:1769612] [] sa_dst_compare_internal 220.181.111.188:0@0 = 220.181.112.244:0@0

2016-10-15 00:08:51.710220 icharge[84043:1769611] [] tcp_connection_create_with_endpoint_and_parameters 1 api.map.baidu.com 443

2016-10-15 00:08:51.711865 icharge[84043:1769611] [] tcp_connection_start 1 starting

2016-10-15 00:08:51.714842 icharge[84043:1769611] [] nw_connection_create creating connection to api.map.baidu.com:443

2016-10-15 00:08:51.717290 icharge[84043:1769611] [] tcp_connection_start starting tc_nwconn=0x7fe017e0c6a0

2016-10-15 00:08:51.718426 icharge[84043:1769611] [] __nw_connection_start_block_invoke 1 starting

2016-10-15 00:08:51.720036 icharge[84043:1769611] [] nw_endpoint_handler_start [1 api.map.baidu.com:443 initial path (null)]

2016-10-15 00:08:51.721186 icharge[84043:1769611] [] nw_connection_endpoint_report [1 api.map.baidu.com:443 initial path (null)]



问题原因

刚用Xcoed8时候吓着了,它默认打开了全信息的log输出,疯狂输出一大堆log信息。建议关闭掉。


解决办法

打开菜单 Product -> Scheme -> Edit Scheme -> Environment Varibales  添加字段OS_ACTIVITY_MODE  并将属性值设置为 disable




参考文章

http://stackoverflow.com/questions/39559602/firebase-logging-garbage-into-console-xcode-8-swift3

猜你喜欢

转载自blog.csdn.net/ruglcc/article/details/52820116