本文整理匯總了C#中System.Log.Insert方法的典型用法代碼示例。如果您正苦於以下問題:C# Log.Insert方法的具體用法?C# Log.Insert怎麽用?C# Log.Insert使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Log
的用法示例。
在下文中一共展示了Log.Insert方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: InsertFatalMessage
public void InsertFatalMessage(FatalMessage message)
{
long appid = CheckAppId(message.OriginIdentity.ToLower());
var tb = new Log();
var newId = tb.Insert(new
{
Date = message.Date,
AppIdentity = appid,
Module = message.ModuleName,
Level = "FATAL",
Message = message.Message,
Exception = message.Exception.ToString()
});
}
示例2: InsertDebugMessage
public void InsertDebugMessage(DebugMessage message)
{
long appid = CheckAppId(message.OriginIdentity.ToLower());
var tb = new Log();
var newId = tb.Insert(new
{
Date = message.Date,
AppIdentity = appid,
Module = message.ModuleName,
Level = "DEBUG",
Message = message.Message,
Exception = message.Stacktrace
});
}
示例3: InsertInfoMessage
public void InsertInfoMessage(InfoMessage message)
{
long appid = CheckAppId(message.OriginIdentity.ToLower());
var tb = new Log();
var newId = tb.Insert(new {
Date=DateTime.Now,
AppIdentity=appid,
Module=message.ModuleName,
Level="INFO",
Message=message.Message,
Exception=string.Empty
});
}
示例4: InsertHitMessage
public void InsertHitMessage(HitMessage message)
{
long appid = CheckAppId(message.OriginIdentity.ToLower());
var tb = new Log();
var newId = tb.Insert(new
{
Date = message.DateofHit,
AppIdentity = appid,
Module = message.ModuleName,
Level = "HIT",
Message = "Hit by user:" +message.User+"|Message:"+message.Message,
Exception = string.Empty
});
}