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(); } } } } }