[Solved] Unity IAP : How can I turn off these messages?

I am using Unity IAP in my game.

When I run on an android device, below message come in ‘Android Monitor’ of ‘Android Studio’

I/UnityIAP: Billing service connected.
I/UnityIAP: invoking callback
I/UnityIAP: Checking for in-app billing 3 support.
I/UnityIAP: In-app billing version 3 supported for xxx.xxx………
I/UnityIAP: Subscriptions AVAILABLE.
I/UnityIAP: VR supported.
I/UnityIAP: onIabSetupFinished: 0
I/UnityIAP: Requesting 16 products
I/UnityIAP: QueryInventory: 16
I/UnityIAP: invoking callback
I/UnityIAP: Querying owned items, item type: inapp
I/UnityIAP: Package name: xxx.xxx………
I/UnityIAP: Calling getPurchases with continuation token: null
I/UnityIAP: Owned items response: 0
I/UnityIAP: Sku is owned: xxxxxxxxx

How can I turn off these messages?

May I ask what impact these messages are having? They are the expected logging output of IAP like most apps have. If might be able to justify the reason other than cosmetic, I can check with the team if there is a error level/verbose setting/flag

I do not want to expose these messages like ‘SKU’ to users in game distribution.
UnityIAP In addition to UnityADS etc… also send a lot of messages.

Why not give developers the option to turn off messages?

Understood, but might you be able to elaborate a bit more, why are the SKU, etc messages harmful? The more information we have, the better case we can make to set the priority. We would need to change core code to make this happen. I checked with the team here, and we will look into the possibility of silencing the logs in a future release.

Upon additional discussion, you could try the following:

Debug.logger.logEnabled = false;

and/or

Debug.logger.filterLogType = LogType.Warning;

It may vary with the different IAP supported stores however.

I’m already using the code below, but I can not turn off the log I want

void Awake()    {
        #if UNITY_EDITOR
        Debug.logger.logEnabled = true;
        Debug.logger.filterLogType = LogType.Log;
        #else
        Debug.logger.logEnabled = false;
        Debug.logger.filterLogType = LogType.Error;
        #endif
}

@onHead Understood, the logging is done in the Unity engine, so we don’t have a lot of control over the logging from the IAP component.