Example #1
0
        private LogEntity getLogEntity(LogWritePara para)
        {
            LogEntity entity = null;

            if (para.ParaDic != null && para.ParaDic.Keys.Count > 0)
            {
                entity             = new LogEntity();
                entity.AppId       = para.ParaDic["appid"];
                entity.Id          = entity.AppId + entity.LogTypeId + DateTime.Now.ToString("yyyyMMddHHmmss");
                entity.LogTypeId   = para.ParaDic["logtypeid"];
                entity.LogTypeName = para.ParaDic["logtypename"];
                entity.Description = para.ParaDic["description"];
                entity.Label       = para.ParaDic["label"];
                entity.Message     = para.ParaDic["message"];
                entity.CreatedTime = DateTime.Now;
                entity.UserId      = para.ParaDic["userid"];
                entity.UserName    = para.ParaDic["username"];
                entity.OrderId     = para.ParaDic["orderid"];
                entity.RelatedId   = para.ParaDic["relatedid"];
                entity.Remark      = para.ParaDic["remark"];
            }
            return(entity);
        }
Example #2
0
 public void Write(LogWritePara para)
 {
     _recorder.Write(getLogEntity(para));
 }