public ActionResult Update(Bam.Net.Logging.Data.LogEvent dao) { try { dao.Save(); return(Json(new { Success = true, Message = "", Dao = dao.ToJsonSafe() })); } catch (Exception ex) { return(GetErrorResult(ex)); } }
private static LogEvent CreateFromFilter(IQueryFilter filter, Database database = null) { Database db = database ?? Db.For <LogEvent>(); var dao = new LogEvent(); filter.Parameters.Each(p => { dao.Property(p.ColumnName, p.Value); }); dao.Save(db); return(dao); }
public override void CommitLogEvent(LogEvent logEvent) { Data.LogEvent logData = new Data.LogEvent(); logData.Source = logEvent.Source.First(4000); logData.Category = logEvent.Category.First(4000); logData.EventId = logEvent.EventID; logData.User = logEvent.User.First(4000); logData.Time = logEvent.Time; logData.MessageSignature = logEvent.MessageSignature.First(4000); logData.MessageVariableValues = logEvent.MessageVariableValues.ToDelimited(v => v, ",").First(4000); logData.Message = logEvent.Message.First(4000); logData.Computer = logEvent.Computer.First(4000); logData.Severity = logEvent.Severity.ToString().First(4000); logData.Save(Database); }