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.

38 lines
1.4 KiB

1 month ago
using System.Collections.Generic;
using Sog;
using Sog.Log;
namespace World
{
public static class WorldBDCLogUtils
{
// 接口通用参数
public static void OnlineScene()
{
var configRealm = WorldServerUtils.GetWorldServerData().m_configRealm;
var realmOnline = WorldServerUtils.GetWorldServerData().realmOnlineAll;
foreach (RealmBriefInfo info in configRealm)
{
if (realmOnline.TryGetValue(info.realmId, out int onlineNum))
{
//var bdc = new BDCLogHelper((int)BDCLogEventId.OnlineScene);
//bdc.Append("server_id", string.IsNullOrEmpty(info.realmBdcName) ? "0" : info.realmBdcName);
//bdc.Append("role_num", onlineNum);
//// 业务发生时间
//bdc.Append("buess_time", WorldServerUtils.GetTimeSecond().ToString());
//BillLogWriter.Instance.SendBDCToBillLogSvr(0, bdc.ToString(), (int)BDCLogEventId.OnlineScene);
var ta = new TALogHelper(TALOG_TYPE.TRACE, info.realmName, null,
TALogEventName.Active_Role);
ta.Add("server", string.IsNullOrEmpty(info.realmBdcName) ? "0" : info.realmBdcName);
ta.Add("online_val", onlineNum);
ta.PutLog();
}
}
}
}
}