How to Set IDEPreferLogStreaming Globally in Xcode 15.4

How do you fix this Xcode error whenever I create a new project it comes back.

The fix is to add IDEPreferLogStreaming=YES but it only fixes for the current project. If I create new project it come back which is annoying to every time add it as YES.

version: Xcode 15.4

I did try out Set this in Product->Scheme->Edit Scheme->Run->Arguments->Environment Variable

IDELogRedirectionPolicy oslogToStdio

OS_ACTIVITY_MODE disable

For reference : Logging Error: Failed to initialize logging system. Log messages may be missing.? I tried these solutions from here

Answered by Developer Tools Engineer in 795844022

Hi, I would recommend actually avoiding setting this env var everywhere. This error message should have been more accurately written but only means that Xcode has not received an initialization message (within a set timeout) from the logging dylib that is inserted into your application. This could be due to your app taking an extended time to launch for example. Unless, after your application does eventually launch, you are not seeing logging messages from your app then you should and would be better to avoid setting this env var on your process.

In short, unless you are not seeing logs from your application you can and should ignore this error message. Additionally if you are finding that this happens to be the case and you are not seeing logging then please file a Feedback on Xcode, here.

Note: In Xcode 16, the logic for this message has changed and you should no longer see it unless a real error has occurred.

Accepted Answer

Hi, I would recommend actually avoiding setting this env var everywhere. This error message should have been more accurately written but only means that Xcode has not received an initialization message (within a set timeout) from the logging dylib that is inserted into your application. This could be due to your app taking an extended time to launch for example. Unless, after your application does eventually launch, you are not seeing logging messages from your app then you should and would be better to avoid setting this env var on your process.

In short, unless you are not seeing logs from your application you can and should ignore this error message. Additionally if you are finding that this happens to be the case and you are not seeing logging then please file a Feedback on Xcode, here.

Note: In Xcode 16, the logic for this message has changed and you should no longer see it unless a real error has occurred.

This could be due to your app taking an extended time to launch for example.

Guess what this was it. On first launch of the app it took a lot of time because I am using M1 8gb ram. But I cleared the console and tried second launch and it didn’t occur.

thank you for explanation 👍

same to me here but, after i updated my phone in iOS 18 new beta started facing this, but before that i had developing some apps, and i did new projects, everything works fine, till i updated my phone, then this problem appears. but still didn't solve yet

How to Set IDEPreferLogStreaming Globally in Xcode 15.4
 
 
Q