Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide strange unwanted Xcode logs

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:100611] bundleid: com.appc.TestiOS10, enable_level: 0, persist_level: 0, propagate_with_activity: 0 2016-06-13 16:33:34.406323 TestiOS10[8209:100607] Created DB, header sequence number = 248 2016-06-13 16:33:34.409564 TestiOS10[8209:100611] subsystem: com.apple.UIKit, category: HIDEvents, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0 2016-06-13 16:33:34.504117 TestiOS10[8209:100607] Created DB, header sequence number = 248 2016-06-13 16:33:34.548023 TestiOS10[8209:100607] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0 2016-06-13 16:33:34.568458 TestiOS10[8209:100608] subsystem: com.apple.FrontBoard, category: Common, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0 

Maybe someone already found a configuration for this to handle?

like image 787
Hans Knöchel Avatar asked Jun 13 '16 23:06

Hans Knöchel


People also ask

How do I delete unwanted logs in Xcode?

From the menu, go to Product > Scheme > Edit Scheme. Now your console is garbage free —Meow!

How do I check Xcode logs?

In the Xcode menu hit Run - Console. This is where NSLog / print / printf etc statements output. The key command is Command + Shift + R.

What is Os_activity_mode?

OS_ACTIVITY_MODE=disable. info, debug, disable. Sets the logging mode of the launched process to the specified level.

Where is the console log in Xcode?

Go to Xcode → Preferences → Debugging → On Start → "Show Console". Save this answer.


2 Answers

Building on the original tweet from @rustyshelf, and illustrated answer from iDevzilla, here's a solution that silences the noise from the simulator without disabling NSLog output from the device.

  1. Under Product > Scheme > Edit Scheme... > Run (Debug), set the OS_ACTIVITY_MODE environment variable to ${DEBUG_ACTIVITY_MODE} so it looks like this:

enter image description here

  1. Go to your project build settings, and click + to add a User-Defined Setting named DEBUG_ACTIVITY_MODE. Expand this setting and Click the + next to Debug to add a platform-specific value. Select the dropdown and change it to "Any iOS Simulator". Then set its value to "disable" so it looks like this:

enter image description here

like image 31
cduhn Avatar answered Sep 28 '22 04:09

cduhn


Try this:

1 - From Xcode menu open: Product > Scheme > Edit Scheme

2 - On your Environment Variables set OS_ACTIVITY_MODE = disable

Screenshot

like image 157
iDevzilla Avatar answered Sep 28 '22 04:09

iDevzilla