public void InsertHitMessage(DistALMessages.HitMessage message) { long appid = CheckAppId(message.OriginIdentity); var tmp = new Log(); tmp.Date = message.DateofHit; tmp.AppIdentity = appid; tmp.Module = message.ModuleName; tmp.Message = "Hit by user:"******"|Message:" + message.Message; tmp.Exception = string.Empty; tmp.Level = "HIT"; using (var log = client.GetTypedClient<Log>()) { tmp.Id = log.GetNextSequence(); using (var trans = client.CreateTransaction()) { trans.QueueCommand(x => x.Store(tmp)); trans.Commit(); } } }
public void InsertDebugMessage(DistALMessages.DebugMessage message) { long appid = CheckAppId(message.OriginIdentity); var tmp = new Log(); tmp.Date = message.Date; tmp.AppIdentity = appid; tmp.Module = message.ModuleName; tmp.Message = message.Message; tmp.Exception = message.Stacktrace; tmp.Level = "DEBUG"; using (var log = client.GetTypedClient<Log>()) { tmp.Id = log.GetNextSequence(); using (var trans = client.CreateTransaction()) { trans.QueueCommand(x => x.Store(tmp)); trans.Commit(); } } }
public void InsertWarningMessage(DistALMessages.WarningMessage message) { long appId = CheckAppId(message.OriginIdentity); var tmp = new Log(); tmp.Date = message.Date== DateTime.MinValue?DateTime.Now:message.Date; tmp.AppIdentity = appId; tmp.App = message.OriginIdentity; tmp.Module = message.ModuleName ?? string.Empty ; tmp.Level = "WARNING"; tmp.Message = message.Message ?? string.Empty; tmp.Exception = message.Exception == null ? string.Empty : message.Exception.ToString(); bool inserted = InsertLog(tmp); }
public void InsertFatalMessage(DistALMessages.FatalErrorMessage message) { long appid = CheckAppId(message.OriginIdentity); var tmp = new Log(); tmp.Date = message.Date; tmp.AppIdentity = appid; tmp.Module = message.ModuleName; tmp.Message = message.Message ?? string.Empty; tmp.Exception = message.Exception??string.Empty; tmp.Level = "FATAL"; using (var log = client.GetTypedClient<Log>()) { tmp.Id = log.GetNextSequence(); using (var trans = client.CreateTransaction()) { trans.QueueCommand(x => x.Store(tmp)); trans.Commit(); } } }
public void InsertInfoMessage(DistALMessages.InfoMessage message) { long appId = CheckAppId(message.OriginIdentity); var tmp = new Log(); tmp.Date = DateTime.Now; tmp.App = message.OriginIdentity; tmp.AppIdentity = appId; tmp.Module = message.ModuleName; tmp.Level = "INFO"; tmp.Message = message.Message; tmp.Exception = string.Empty; bool inserted = InsertLog(tmp); }
public void InsertHitMessage(DistALMessages.HitMessage message) { long appId = CheckAppId(message.OriginIdentity); var tmp = new Log(); tmp.Date = message.DateofHit; tmp.AppIdentity = appId; tmp.App = message.OriginIdentity; tmp.Module = message.ModuleName; tmp.Level = "HIT"; tmp.Message = "Hit by user:"******"|Message:" + message.Message; tmp.Exception = string.Empty; bool inserted = InsertLog(tmp); }
public void InsertFatalMessage(DistALMessages.FatalErrorMessage message) { long appId = CheckAppId(message.OriginIdentity); if (message != null) { var tmp = new Log(); tmp.Date = message.Date == DateTime.MinValue ? DateTime.Now : message.Date; tmp.AppIdentity = appId; tmp.App = message.OriginIdentity; tmp.Module = message.ModuleName ?? string.Empty; tmp.Level = "FATAL"; tmp.Message = message.Message??string.Empty; tmp.Exception = message.Exception==null?string.Empty:message.Exception.ToString(); bool inserted = InsertLog(tmp); } }
public void InsertErrorMessage(DistALMessages.ErrorMessage message) { long appId = CheckAppId(message.OriginIdentity); var tmp = new Log(); tmp.Date = message.Date; tmp.AppIdentity = appId; tmp.App = message.OriginIdentity; tmp.Module = message.ModuleName; tmp.Level = "ERROR"; tmp.Message = message.Message; tmp.Exception = message.Exception.ToString(); bool inserted = InsertLog(tmp); }
public void InsertDebugMessage(DistALMessages.DebugMessage message) { long appId = CheckAppId(message.OriginIdentity); var tmp = new Log(); tmp.Date = message.Date; tmp.App = message.OriginIdentity; tmp.AppIdentity = appId; tmp.Module = message.ModuleName; tmp.Level = "DEBUG"; tmp.Message = message.Message; tmp.Exception = message.Stacktrace; bool inserted=InsertLog(tmp); }