skip to Main Content

React Native: 0.72.5

Expo: 49.0.10

Using the iOS Simulator

I’m seeing hundreds of logs, without prompting, and for every little UI button I press, or scroll a listview. Its highly annoying because the logs I want to see are impossible to find.

For example, there are tons like this


[MediaToolbox] <<<< FigFilePlayer >>>> itemfig_setCurrentTimeWithRangeAndIDGuts: [0x162ef3e00] I/YGB.02 called, time = 0.000, flags =
[MediaToolbox] <<<< Boss >>>> FigPlaybackBossSetTimeWithRange: (0x165c7c980) playState set to Paused

How do I disable this?

2

Answers


  1. If the issue is not in the XCode, you can try Modify Info.plist: You need to edit the Info.plist file located in your project directory under ios/YourProjectName/. Add the following lines within the dict tag:

    <key>NSLogShowAssertionMessages</key>
    <false/>
    
    Login or Signup to reply.
  2. Yes, I know, you are not a native swift/OC developer, native swift/OC developers view logs related to their apps in Xcode console. And For the most cases, what they see inside Xcode Console is only related to their apps.

    But for React Native developers, you can view the logs in the Console.app. But without proper filtering, you console app will be flooded with log from all processes. Most logs of these processes are not related to your app.

    For example, the MediaToolbox/FigFilePlayer log messages you pasted are just from Apple’s backend frameworks for media playback, your operation in Apple Music even triggers these logs.

    I also have the same logs on my mac’s Console:
    enter image description here

    So, you can filter the logs from your app by entering your app’s executable’s name(assuming fooBar as the process name) as the filter:

    enter image description here

    Apple offers a well documented page here, please take a look.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search