Hide strange unwanted Xcode logs

前端 未结 13 2933
孤独总比滥情好
孤独总比滥情好 2020-11-22 02:34

When using the Xcode 8+ and creating a new blank project, the following logs appear when running the application:

2016-06-13 16:33:34.406093 TestiOS10[8209:1         


        
13条回答
  •  别那么骄傲
    2020-11-22 03:06

    In Xcode 10 the OS_ACTIVITY_MODE variable with disable (or default) value also turns off the NSLog no matter what.

    So if you want to get rid of the console noise but not of your own logs, you could try the good old printf("") instead of the NSLog since it is not affected by the OS_ACTIVITY_MODE = disable.

    But better check out the new os_log API here.

提交回复
热议问题