AppLovin / AppLovin-MAX-SDK-iOS

84 stars 69 forks source link

Add option to silence all the logs #294

Closed lionel-alves closed 2 months ago

lionel-alves commented 3 months ago

MAX SDK Version

last

Device/Platform Info

iOS

Current Behavior

Event with verbose disable there is way to much logs by default.

Expected Behavior

Remove all logs and add options to enable them.

How to Reproduce

Initialize SDK

Additional Info

No response

thomasmso commented 3 months ago

@lionel-alves - Are there any logs in specific that you are referring to? We can clean up the logs not guarded by the flag a bit.

lionel-alves commented 3 months ago

Hi @thomasmso, Sorry for the late response, here is the minimum of log I can get on launch. When I am not working on the integration I don't need any log from AppLovin except errors. Thanks!

[AppLovinSdk] DEBUG [ALSdkSettings] -[ALSdkSettings setCreativeDebuggerEnabled: 1]
[AppLovinSdk] DEBUG [ALSdkSettings] -[ALSdkSettings setExceptionHandlerEnabled: 1]
[AppLovinSdk] DEBUG [ALSdkSettings] -[ALSdkSettings setLocationCollectionEnabled: 1]
[AppLovinSdk] DEBUG [ALConsentFlowSettings] Creating with initial values: isEnabled=0,
    privacyPolicyURL=(null),
    termsOfServiceURL=(null)
[AppLovinSdk] DEBUG [ALSdkSettings] Setting Debug User Geography: 0
[AppLovinSdk] DEBUG [ALTCFManager] Attempting to update consent from Additional Consent string: (null)
[AppLovinSdk] ERROR [ALMediationUtils] Failed to get adaptive banner size. Will fallback to using format specific ad view ad size. +[NSInvocation _invocationWithMethodSignature:frame:]: method signature argument cannot be nil
[AppLovinSdk] DEBUG [AppLovinSdk] 
========================================
=====AppLovin SDK=====
===SDK Versions===
Version: 12.1.0
Plugin Version: 
Ad Review Version: 
OM SDK Version: 1.4.9-Applovin
===Device Info===
OS: iOS 17.2
IDFA: <Enable verbose logging to see the IDFA to use for test devices - https://monetization-support.applovin.com/hc/en-us/articles/236114328-How-can-I-expose-verbose-logging-for-the-SDK>
Model: arm64
Locale: en_US@rg=frzzzz
Simulator: 1
Tablet: 0
===App Info===
Bundle ID: io.voodoo.wave
Has AppLovinSDKResources: true
NSAdvertisingAttributionReportEndpoint: (null)
===SDK Settings===
SDK Key: <redacted>
Mediation Provider: max
TG: 83
AEI: 120
MEI: 9
Test Mode On: true
Verbose Logging On: false
===Privacy States===
Please review AppLovin MAX documentation to be compliant with regional privacy policies.

Age Restricted User - No value set
Has User Consent - true
"Do Not Sell" - No value set
===App Tracking Transparency===
Authorization Status: Not Determined (0)
NSUserTrackingUsageDescription Exists: false
===MAX Terms Flow===
Enabled: false
Privacy Policy URL: (null)
Terms of Service URL: (null)
===CMP (Consent Management Platform)===

CMP Name - No value set
CMP SDK ID - No value set
CMP SDK Version - No value set
IABTCF_gdprApplies - No value set
IABTCF_TCString - No value set
IABTCF_AddtlConsent - No value set
========================================
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings setHasUserConsent:]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings hasUserConsent]
thomasmso commented 3 months ago

@lionel-alves - We'll clean up some of the logs. A cleaned up version of the above would look something like this:

[AppLovinSdk] DEBUG [ALSdkSettings] -[ALSdkSettings setCreativeDebuggerEnabled: 1]
[AppLovinSdk] DEBUG [ALSdkSettings] -[ALSdkSettings setExceptionHandlerEnabled: 1]
[AppLovinSdk] DEBUG [ALSdkSettings] -[ALSdkSettings setLocationCollectionEnabled: 1]
[AppLovinSdk] DEBUG [ALConsentFlowSettings] Creating with initial values: isEnabled=0,
    privacyPolicyURL=(null),
    termsOfServiceURL=(null)
[AppLovinSdk] DEBUG [ALSdkSettings] Setting Debug User Geography: 0
[AppLovinSdk] DEBUG [AppLovinSdk] 
========================================
=====AppLovin SDK=====
===SDK Versions===
Version: 12.1.0
Plugin Version: 
Ad Review Version: 
OM SDK Version: 1.4.9-Applovin
===Device Info===
OS: iOS 17.2
IDFA: <Enable verbose logging to see the IDFA to use for test devices - https://monetization-support.applovin.com/hc/en-us/articles/236114328-How-can-I-expose-verbose-logging-for-the-SDK>
Model: arm64
Locale: en_US@rg=frzzzz
Simulator: 1
Tablet: 0
===App Info===
Bundle ID: io.voodoo.wave
Has AppLovinSDKResources: true
NSAdvertisingAttributionReportEndpoint: (null)
===SDK Settings===
SDK Key: <redacted>
Mediation Provider: max
TG: 83
AEI: 120
MEI: 9
Test Mode On: true
Verbose Logging On: false
===Privacy States===
Please review AppLovin MAX documentation to be compliant with regional privacy policies.

Age Restricted User - No value set
Has User Consent - true
"Do Not Sell" - No value set
===App Tracking Transparency===
Authorization Status: Not Determined (0)
NSUserTrackingUsageDescription Exists: false
===MAX Terms Flow===
Enabled: false
Privacy Policy URL: (null)
Terms of Service URL: (null)
===CMP (Consent Management Platform)===

CMP Name - No value set
CMP SDK ID - No value set
CMP SDK Version - No value set
IABTCF_gdprApplies - No value set
IABTCF_TCString - No value set
IABTCF_AddtlConsent - No value set
========================================
[AppLovinSdk] DEBUG [ALPrivacySettings] +[ALPrivacySettings setHasUserConsent:]
ddaddy commented 3 months ago

There should be an option to disable ALL logs.

thomasmso commented 3 months ago

@ddaddy - We'll consider it.

lionel-alves commented 2 months ago

+1 for an option to remove all the logs

jruston commented 2 months ago

Also think there should be an option to turn off all the logging. When I'm not working on the integration, this logging gets in the way for no practical benefit.

thomasmso commented 2 months ago

I've taken your feedback, and the next SDK release (1-3wks) will offer ability to disable all logs. Will keep this thread posted. Lmk if any Qs in the meantime.

thomasmso commented 2 months ago

SDK v12.3.0 has been released. To disable all logs, please initialize the SDK as follows:

let initConfig = ALSdkInitializationConfiguration(sdkKey: "YOUR_SDK_KEY") { builder in
    builder.mediationProvider = "max"
}

let sdk = ALSdk.shared()!
sdk.settings.setExtraParameterForKey("disable_all_logs", value: "true")
sdk.initialize(with: initConfig) { config in
    ...