update: 新增打印 DeviceData 的日志

Signed-off-by: huyufei <yufei.hu@castbox.fm>
main
胡宇飞 2024-06-27 18:53:24 +08:00
parent 81f37625c1
commit 8cc083410d
3 changed files with 6 additions and 6 deletions

View File

@ -224,17 +224,17 @@ namespace Guru
/// </summary>
/// <param name="status"></param>
/// <param name="channel"></param>
/// <param name="others"></param>
public static void AttResult(string status, string type = "custom", string others = "")
/// <param name="scene"></param>
public static void AttResult(string status, string type = "custom", string scene = "")
{
SetAttProperty(status);
Debug.Log($"{TAG} AttResult: {status} type:{type} others:{others}");
Debug.Log($"{TAG} AttResult: {status} type:{type} others:{scene}");
var dict = new Dictionary<string, dynamic>()
{
{ ParameterItemCategory, status },
{ "type", type }
};
if(!string.IsNullOrEmpty(others)) dict[ParameterItemName] = others;
if(!string.IsNullOrEmpty(scene)) dict[ParameterItemName] = scene;
LogEvent(EventATTResult, dict);
}

View File

@ -72,7 +72,7 @@ namespace Guru
$"{nameof(language)}: {language}, {nameof(locale)}: {locale}, {nameof(deviceToken)}: {deviceToken}, {nameof(deviceType)}: {deviceType}, " +
$"{nameof(pushType)}: {pushType}, {nameof(appIdentifier)}: {appIdentifier}, {nameof(appVersion)}: {appVersion}, {nameof(brand)}: {brand}, " +
$"{nameof(model)}: {model}, {nameof(timezone)}: {timezone}, {nameof(pushNotificationEnable)}: {pushNotificationEnable}, " +
$"{nameof(firebaseAppInstanceId)}: {firebaseAppInstanceId}, {nameof(idfa)}: {idfa}, {nameof(adid)}: {adid}, {nameof(gpsAdid)}: {gpsAdid}";
$"{nameof(firebaseAppInstanceId)}: {firebaseAppInstanceId}, {nameof(idfa)}: {idfa}, {nameof(adid)}: {adid}, {nameof(gpsAdid)}: {gpsAdid}, {nameof(userUuid)}: {userUuid}";
}
}

View File

@ -19,7 +19,7 @@ namespace Guru
{
DeviceData deviceData = new DeviceData();
deviceData.pushNotificationEnable = _isPushEnabled;
this.Log($"send deviceData:{deviceData}");
UnityEngine.Debug.Log($"[SDK] --- Send DeviceData:{deviceData}");
var request = new UnityWebRequest(RequestURL, "POST");
request.uploadHandler = new UploadHandlerRaw(Encoding.UTF8.GetBytes(JsonUtility.ToJson(deviceData)));
request.downloadHandler = new DownloadHandlerBuffer();