コード例 #1
0
        public ReturnModel <bool> DeleteAllLogs()
        {
            if (client.IndexExists(appLogIndexName).Exists)
            {
                client.DeleteIndex(appLogIndexName);
            }

            if (client.IndexExists(perfLogIndexName).Exists)
            {
                client.DeleteIndex(perfLogIndexName);
            }

            return(ReturnModel <bool> .Success(true));
        }
コード例 #2
0
        public ReturnModel <bool> DeleteAllLogs(StoredLogType logType)
        {
            if (logType == StoredLogType.AppLog)
            {
                if (client.IndexExists(appLogIndexName).Exists)
                {
                    client.DeleteIndex(appLogIndexName);
                }
            }

            if (logType == StoredLogType.PerfLog)
            {
                if (client.IndexExists(perfLogIndexName).Exists)
                {
                    client.DeleteIndex(perfLogIndexName);
                }
            }

            return(ReturnModel <bool> .Success(true));
        }
コード例 #3
0
 public ReturnModel <bool> DeleteOldLogs(StoredLogType logType, DateTime pastDate)
 {
     dbManager.Delete <AppLog>(x => x.LogType == (int)logType && x.Longdate < pastDate);
     return(ReturnModel <bool> .Success(true));
 }
コード例 #4
0
 public ReturnModel <bool> DeleteLog(StoredLogType logType, string id)
 {
     dbManager.Delete <AppLog>(x => x.LogType == (int)logType && x.LogId == SafeUtils.Guid(id));
     return(ReturnModel <bool> .Success(true));
 }
コード例 #5
0
 public ReturnModel <bool> DeleteAllLogs(StoredLogType logType)
 {
     dbManager.Delete <AppLog>(x => x.LogType == (int)logType);
     return(ReturnModel <bool> .Success(true));
 }
コード例 #6
0
 public ReturnModel <bool> DeleteAllLogs()
 {
     dbManager.Delete <AppLog>(x => true);
     return(ReturnModel <bool> .Success(true));
 }