You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

119 lines
3.8 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Sog;
using Sog.Log;
using ProtoCSStruct;
namespace World
{
public static class WorldBillLogUtils
{
public static void LogOnlinePlayer(int OnlinePlayer)
{
BillLogHelper blh = new BillLogHelper((int)BillLogType.OnlinePlayer);
blh.Append("OnlinePlayer", OnlinePlayer);
string logMessage = blh.ToString();
BillLogWriter.Instance.SendToBillLogSvr(0, logMessage);
}
public static void LogWebFirebasePush(List<long> uids, string content, string key, string value)
{
BillLogHelper blh = new BillLogHelper((int)BillLogType.WebFirebasePush);
blh.Append("content", content);
blh.Append("key", key);
blh.Append("value", value);
string logMessage = blh.ToString();
BillLogWriter.Instance.SendToBillLogSvr(0, logMessage);
}
//举报
public static void LogTipOffPlayer(long targetUid, long tipOffUid, string reason, int beTipOffCount)
{
BillLogHelper blh = new BillLogHelper((int)BillLogType.TipOffPlayer);
blh.Append("uid", tipOffUid);
blh.Append("targetUid", targetUid);
blh.Append("reason", reason);
blh.Append("beTipOffCount", beTipOffCount);
string logMessage = blh.ToString();
BillLogWriter.Instance.SendToBillLogSvr(tipOffUid, logMessage);
}
//禁言
public static void LogGagChatPlayer(long uid, long endTime)
{
BillLogHelper blh = new BillLogHelper((int)BillLogType.GagChat);
blh.Append("uid", uid);
blh.Append("endTime", endTime);
string logMessage = blh.ToString();
BillLogWriter.Instance.SendToBillLogSvr(uid, logMessage);
}
//玩家安装时返回的数据
public static void LogPlayerPhoneData(Dictionary<string, string> m_map)
{
BillLogHelper blh = new BillLogHelper((int)BillLogType.PlayerPhoneInfo);
foreach(var a in m_map)
{
blh.Append(a.Key, a.Value);
}
string logMessage = blh.ToString();
BillLogWriter.Instance.SendToBillLogSvr(0, logMessage);
}
public static void LogLinkClickCount(Dictionary<string, string> m_map)
{
BillLogHelper blh = new BillLogHelper((int) BillLogType.LinkClickCount);
foreach (var a in m_map)
{
blh.Append(a.Key, a.Value);
}
string logMessage = blh.ToString();
BillLogWriter.Instance.SendToBillLogSvr(0, logMessage);
}
public static void LogRetentionOptimizetion(int push1Count, int succ1Count, int push2Count, int succ2Count, int twicePush, int totalPush, int totalSucc, int day)
{
BillLogHelper blh = new BillLogHelper((int)BillLogType.RetentionOptimizetion);
blh.Append("push1Count", push1Count);
blh.Append("succ1Count", succ1Count);
blh.Append("push2Count", push2Count);
blh.Append("succ2Count", succ2Count);
blh.Append("twicePush", twicePush);
blh.Append("totalPush", totalPush);
blh.Append("totalSucc", totalSucc);
blh.Append("day", day);
string logMessage = blh.ToString();
BillLogWriter.Instance.SendToBillLogSvr(0, logMessage);
}
public static void LogVipCardNotLoginPush(long uid, int cardId)
{
BillLogHelper blh = new BillLogHelper((int)BillLogType.VipCardNotLoginPush);
blh.Append("uid", uid);
blh.Append("cardId", cardId);
string logMessage = blh.ToString();
BillLogWriter.Instance.SendToBillLogSvr(0, logMessage);
}
}
}