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.
 
 
 
 
 
 

73 lines
1.8 KiB

/*
Sog 游戏基础库
2016 by zouwei
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using Aliyun.Api.LOG;
using ProtoCSStruct;
using Sog;
using Sog.IO;
namespace BillLog
{
public class GmCmdSvc : BaseReloadableService
{
public override int GetServiceType()
{
return BillLogServiceType.GmCmdSvc;
}
//销毁的时候清空指令注册
public override void Dispose()
{
GmCommandMgr.Instance.ClearAll();
}
//构造的时候注册所有指令
public GmCmdSvc()
{
RegisterAllGmCmd();
}
private void RegisterAllGmCmd()
{
GmCommandMgr.Instance.Register("PutLog", "PutLog", this.PutLog);
GmCommandMgr.Instance.Register("PutLogBillBdc", "PutLogBillBdc", this.PutLogBillBdc);
}
// 测试log连通性
public int PutLog(long userid, string[] cmdParams)
{
string name = "GM_TEST";
if (cmdParams.Length > 0)
{
name = cmdParams[0];
}
try
{
//var req = new SSBDCLogsReq();
//req.SSBDCLogReq[0].LogMsg.SetString($"event_id=10006|role_name={name}|platform=SERVER_TEST");
//MessageTaskHandler.m_allTaskHandler[0].OnBDCLogsReqInner(0, ref req);
}
catch (Exception ex)
{
TraceLog.Exception(ex);
}
return 0;
}
public int PutLogBillBdc(long userid, string[] cmdParams)
{
TraceLog.Trace("this is ReadServerConfig config file bdc info:{0}", BillLogServerUtils.GetServerConfig().bdcCfg.accesskeyID);
return 0;
}
}
}