Example #1
0
 /// <summary>
 /// 业务日志
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int InsertBusinessLog(BusinessLogEntity entity)
 {
     try
     {
         return(coon.Execute("INSERT INTO BusinessLog(LogType, MessageOne,MessageTwo) " +
                             "VALUES(@LogType, @MessageOne,@MessageTwo)", entity));
     }
     catch (Exception e)
     {
         return(0);
     }
 }
Example #2
0
        private void Log()
        {
            BusinessLogEntity entity = new BusinessLogEntity();
            entity.LogCategory = LogCategoryName;
            entity.LogDate = DateTime.Now;
            entity.Logger = this.TaskNameInConfig;
            entity.LogLevel = LogLevels.Notice.ToString();
            entity.LogMessage = string.Empty;
            entity.LogStatus = Logics.True;
            entity.LogThread = string.Empty;

            BusinessLogBLL.Instance.Create(entity);
        }
Example #3
0
        public static void WriteBusinessLog(string method, string messageOne, string messageTwo)
        {
            LogDao logDao = new LogDao();

            BusinessLogEntity entity = new BusinessLogEntity()
            {
                LogType    = method,
                MessageOne = messageOne,
                MessageTwo = messageTwo
            };

            logDao.InsertBusinessLog(entity);
        }
Example #4
0
        private void Log()
        {
            BusinessLogEntity entity = new BusinessLogEntity();

            entity.LogCategory = LogCategoryName;
            entity.LogDate     = DateTime.Now;
            entity.Logger      = this.TaskNameInConfig;
            entity.LogLevel    = LogLevels.Notice.ToString();
            entity.LogMessage  = string.Empty;
            entity.LogStatus   = Logics.True;
            entity.LogThread   = string.Empty;

            BusinessLogBLL.Instance.Create(entity);
        }