本文整理汇总了C#中NLogEx.LoggerEx.Fatal方法的典型用法代码示例。如果您正苦于以下问题:C# NLogEx.LoggerEx.Fatal方法的具体用法?C# NLogEx.LoggerEx.Fatal怎么用?C# NLogEx.LoggerEx.Fatal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NLogEx.LoggerEx
的用法示例。
在下文中一共展示了NLogEx.LoggerEx.Fatal方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadMonitorTimer_Elapsed
/// <summary>
/// 线程加载监控平台
/// </summary>
private static void LoadMonitorTimer_Elapsed()
{
NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
System.Threading.Thread.Sleep(CgwConst.Thread_Sleep_Time);
SmcErr smcErr = new SmcErr();
try
{
smcErr = MonitorManageService.Instance().Load();
if (false == smcErr.IsSuccess())
{
logEx.Error("MonitorManageService Start failed! Errno :{0}", smcErr.ErrNo);
NLog.LogManager.Flush();
System.Diagnostics.Process.GetCurrentProcess().Kill();
}
}
catch (Exception ex)
{
logEx.Fatal(ex, "MonitorManageService LoadMonitor Failed!");
NLog.LogManager.Flush();
}
}
示例2: InitService
/// <summary>
/// 初始化融合网管服务
/// </summary>
public void InitService()
{
NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
//初始化监控平台
SmcErr err = new SmcErr();
err = MonitorChannelBll.Instance().LoadMonitor();
if (err.IsSuccess())
{
logEx.Trace("Load VideoMonitor Successful !");
}
else
{
logEx.Fatal("Load VideoMonitor Failed, ErrNo : {0}!", err.ErrNo);
}
}
示例3: Load
/// <summary>
/// 线程加载cgw
/// </summary>
/// <returns></returns>
public SmcErr Load()
{
SmcErr err = new SmcErr();
NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
//初始化监控平台
err = VideoMonitorManage.Instance().Load();
VideoMonitorManage.Instance().SetDataCallBackFunc(DataCallBackFunc);
if (err.IsSuccess())
{
logEx.Trace("Load CgwMonitorManage Successful !");
isLoadSuccess = true;
}
else
{
logEx.Fatal("Load CgwMonitorManage Failed, ErrNo : {0}!", err.ErrNo);
}
return err;
}
示例4: LoginThread
/// <summary>
/// 监控平台加载器,轮询加载,直到成功
/// </summary>
/// <param name="loginInfo"></param>
private void LoginThread(Object loginInfoObj)
{
NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
logEx.Trace("Enter: eLTEVideoMonitor.LoginThread().");
try
{
eLTELoginInfo loginInfo = loginInfoObj as eLTELoginInfo;
if (loginInfo == null)
{
logEx.Error("loginInfoObj is Null.");
return;
}
if (loginInfo.NotFirstLogin == true)
{
//登陆失败,等待一分后再次尝试登陆
Thread.Sleep(5000);
}
//本机IP
//string localIP = GetLocalIP(ip, iPort, ilocalPort);
if (string.IsNullOrEmpty(localIP))
{
localIP = GetLocalIP(ip, iPort, ilocalPort);
}
logEx.Trace("Call eLTEVideoMonitor.Login({0},{1},{2},{3}).", loginInfo.Ip, loginInfo.Port, loginInfo.User, localIP);
//设置登录服务器IP、本地IP、用户名、密码、sip端口等信息
ELTE_RESULT result = (ELTE_RESULT)lteSdkClient.Set_Login_Info(loginInfo.Ip, localIP, loginInfo.User, loginInfo.Pwd, loginInfo.Port.ToString(), Convert.ToInt32(loginInfo.User));
if (result != ELTE_RESULT.RET_SUCCESS)
{
logEx.Error("Set_Login_Info failed.Monitor id:{0}.ip:{1}, port:{2}, user:{3}", this.monitorId, loginInfo.Ip, loginInfo.Port, loginInfo.User);
}
//发起视频回传成功后,在状态变化事件中处理视频接收
if (callP2pvideo == null)
{
callP2pvideo = P2pStatusDelegateFun;
eLTEInterface.SetP2pVideoCallStaCallBack(callP2pvideo);
callResStatus = CallbackResStatusDelegateFun;
eLTEInterface.SetResStaCallBack(callResStatus);
callUserStatus = CallUserStatusDelegateFun;
eLTEInterface.SetUserStaCallBack(callUserStatus);
callProvisionAllResync = CallProvisionAllDelegateFun;
eLTEInterface.SetProvisionAllResyncCallBack(callProvisionAllResync);
callModuleStatus = CallModuleStatusDelegateFun;
eLTEInterface.SetModStaCallBack(callModuleStatus);
//设置rtp转码回调函数
frameDataCallBack = FrameDataCallBackFun;
//初始化rtp转码模块
rtpAdapter.ESDK_RTP_Init();
//设置NETSOURCE日志目录
IVS_NETSOURCE_RESULT iNet = NetSourcedInterface.IVS_NETSOURCE_Init(AppDomain.CurrentDomain.BaseDirectory + "\\logs");
if (iNet != IVS_NETSOURCE_RESULT.SUCCESS)
{
logEx.Error("SipStackAdapter.IVS_NETSOURCE_Init Failed.");
}
}
//初始化上下文,启动SDK
result = (ELTE_RESULT)lteSdkClient.SDK_START();
if (result != ELTE_RESULT.RET_SUCCESS)
{
logEx.Fatal("eLTEVideoMonitor.SDK_START failed.Monitor id:{0}.ip:{1}, port:{2}, user:{3},ErrorNo:{4}", this.monitorId, loginInfo.Ip, loginInfo.Port, loginInfo.User,(int)result);
//服务器端返回错误, 操作被调度机拒绝
if ((int)(result) == -40097)
{
logEx.Fatal("Login to eLTEVideoMonitor failed,elte remote failed,elte refuse to connect.");
}
}
else
{
isLoginSuccess = true;
logEx.Info("eLTEVideoMonitor.SDK_START success.Monitor id:{0}.ip:{1}, port:{2}, user:{3}.", this.monitorId, loginInfo.Ip, loginInfo.Port, loginInfo.User);
}
}
catch (System.Exception ex)
{
logEx.Error("Load eLTEVideoMonitor failed. Exception message:{0}.", ex.Message);
}
}
示例5: StopAllStream
/// <summary>
/// 线程Unload cgw
/// </summary>
/// <returns></returns>
public SmcErr StopAllStream()
{
SmcErr err = new SmcErr();
NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
//Stop VideoData
err = MonitorChannelBll.Instance().StopAllStream();
if (err.IsSuccess())
{
logEx.Info("UnLoad CgwService Successful !");
}
else
{
logEx.Fatal("UnLoad CgwService Failed, ErrNo : {0}!", err.ErrNo);
}
return err;
}
示例6: Load
/// <summary>
/// 线程加载cgw
/// </summary>
/// <returns></returns>
public SmcErr Load()
{
SmcErr err = new SmcErr();
NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
//初始化监控平台
err = MonitorChannelBll.Instance().Load();
if (err.IsSuccess())
{
logEx.Trace("Load CgwService Successful !");
isLoadSuccess = true;
}
else
{
logEx.Fatal("Load CgwService Failed, ErrNo : {0}!", err.ErrNo);
}
return err;
}
示例7: Main
static void Main(string[] args)
{
SmcErr smcErr = new SmcErr();
NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
try
{
logEx.Info("Enter: Start Cgw Service");
CgwServiceInit cgwService = new CgwServiceInit();
smcErr = CgwService.Instance().InitService();
if (smcErr.IsSuccess())
{
cgwService.InitServiceInfo();
string LocalServiceStartMode = CommonFunction.GetAppSetting("LocalServiceStartMode");
if (string.IsNullOrEmpty(LocalServiceStartMode))
{
LocalServiceStartMode = "1";
}
CgwService.Instance().LicenseInit();
Thread dbConnectionThread = new Thread(new ThreadStart(LoadMonitorTimer_Elapsed));
dbConnectionThread.Start();
ServiceRun.StarUpService(LocalServiceStartMode, "HUAWEI SMC 2.0 ConvergeGateway", cgwService);
//logEx.Info("CGW service Start Successful!");
}
else
{
logEx.Error("CGW service Start failed! Errno :{0}", smcErr.ErrNo);
NLog.LogManager.Flush();
System.Diagnostics.Process.GetCurrentProcess().Kill();
}
}
catch (System.Exception e)
{
logEx.Fatal(e, "CGW service Start Failed!");
NLog.LogManager.Flush();
}
}