Skip to content

Commit d4b7670

Browse files
committed
change Debug to CmpDebugUtil
1 parent a830cf7 commit d4b7670

File tree

6 files changed

+12
-15
lines changed

6 files changed

+12
-15
lines changed

Assets/ConsentManagementProvider/Scripts/facade/CMP.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static void LoadMessage(string authId = null)
6565
{
6666
if (IsEditor)
6767
{
68-
Debug.LogWarning("Emulating LoadMessage call... Sourcepoint CMP works only for real Android/iOS devices, not the Unity Editor.");
68+
CmpDebugUtil.LogWarning("Emulating LoadMessage call... Sourcepoint CMP works only for real Android/iOS devices, not the Unity Editor.");
6969
return;
7070
}
7171

Assets/ConsentManagementProvider/Scripts/json/JsonUnwrapper.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,8 @@ private static JsonElement getValueJsonElement(JsonElement element, string name)
195195
JsonElement value = getValueJsonElement(element, name);
196196
if (value.ValueKind == JsonValueKind.Undefined)
197197
{
198-
Debug.Log(name + " NOT unwrap!");
199198
return null;
200199
}
201-
Debug.Log(name + " unwrap!");
202200
return value.ToString();
203201
}
204202

@@ -207,10 +205,8 @@ private static object getObjectJsonElement(JsonElement element, string name)
207205
JsonElement value = getValueJsonElement(element, name);
208206
if (value.ValueKind == JsonValueKind.Undefined)
209207
{
210-
Debug.Log(name + " NOT unwrap!");
211208
return null;
212209
}
213-
Debug.Log(name + " unwrap!");
214210
return value;
215211
}
216212

Assets/ConsentManagementProvider/Scripts/wrapper/iOS/CMPiOSListenerHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void OnConsentReady(string message)
4949
}
5050
catch (Exception ex)
5151
{
52-
Debug.LogError(
52+
CmpDebugUtil.LogError(
5353
"Something went wrong while parsing the json data; null will be returned. \n Exception message: " +
5454
ex.Message);
5555
}
@@ -96,7 +96,7 @@ void OnCustomConsentGDPRCallback(string jsonSPGDPRConsent)
9696
}
9797
catch (Exception ex)
9898
{
99-
Debug.LogError(
99+
CmpDebugUtil.LogError(
100100
"Something went wrong while parsing the json data; null will be returned. \n Exception message: " +
101101
ex.Message);
102102
}

Assets/ExampleApp/Scripts/ConsentEventHandler.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,32 @@ void Awake()
1616

1717
public void OnConsentUIReady()
1818
{
19-
Debug.LogWarning("User will be shown the web view with series of consent messages!");
19+
CmpDebugUtil.LogWarning("User will be shown the web view with series of consent messages!");
2020
}
2121

2222
public void OnConsentAction(CONSENT_ACTION_TYPE action)
2323
{
24-
Debug.LogWarning($"User made {action} action with consent view!");
24+
CmpDebugUtil.LogWarning($"User made {action} action with consent view!");
2525
}
2626

2727
public void OnConsentError(Exception exception)
2828
{
29-
Debug.LogError("Oh no, an error! " + exception.Message);
29+
CmpDebugUtil.LogError("Oh no, an error! " + exception.Message);
3030
}
3131

3232
public void OnConsentUIFinished()
3333
{
34-
Debug.LogWarning("User has interacted with the web view consent message and it is disappeared!");
34+
CmpDebugUtil.LogWarning("User has interacted with the web view consent message and it is disappeared!");
3535
}
3636

3737
public void OnConsentSpFinished(SpConsents spConsents)
3838
{
39-
Debug.LogWarning("OnSpFinished() called!");
39+
CmpDebugUtil.LogWarning("OnSpFinished() called!");
4040
}
4141

4242
public void OnConsentReady(SpConsents spConsents)
4343
{
44-
Debug.Log($"The user interaction on consent messages is done. You can use the spConsent info; \n If it was the last from the series of consents, you can continue user's gaming experience!");
44+
CmpDebugUtil.Log($"The user interaction on consent messages is done. You can use the spConsent info; \n If it was the last from the series of consents, you can continue user's gaming experience!");
4545
}
4646

4747
private void OnDestroy()

Assets/ExampleApp/Scripts/CustomConsentButtonCaller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public void OnCustomConsentButtonClick()
2020

2121
private void SuccessDelegate(GdprConsent customConsent)
2222
{
23-
Debug.Log($"I am your success callback!");
23+
CmpDebugUtil.Log($"I am your success callback!");
2424
}
2525
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
using UnityEngine;
2+
using ConsentManagementProviderLib;
23

34
public class ClickStubCmpButton : MonoBehaviour
45
{
56
public void LogStubOnClick()
67
{
7-
Debug.Log($"{this.name} element has been CKICKED");
8+
CmpDebugUtil.Log($"{this.name} element has been CKICKED");
89
}
910
}

0 commit comments

Comments
 (0)