Exemplo n.º 1
0
 public Task UpdateLog(Guid guid, string title, string message, LogType logType = LogType.ApplicationServiceLog, GenericPriorityType priorityType = GenericPriorityType.Information)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 2
0
    public async Task <Guid?> NewLog(string name, string message, string initiator, RequestServerBO requestServer, LogType logType = LogType.ApplicationServiceLog, GenericPriorityType priorityType = GenericPriorityType.Information)
    {
        var entity = await _dataLayer.TblApplications
                     .AsNoTracking()
                     .AsSplitQuery()
                     .FirstOrDefaultAsync(i => i.Guid == $"{requestServer.ApplicationId}");

        if (entity is null)
        {
            throw new ArgumentException($"Application with Guid '{requestServer.ApplicationId}' does not exist in any tenants");
        }

        var log = new TblLog()
        {
            ApplicationId = entity.Id,
            Initiator     = initiator,
            Severity      = (short)priorityType,
            Message       = message,
            Name          = name,
            Type          = (short?)logType,
            Uuid          = requestServer.RequestId.ToString()
        };

        _dataLayer.TblLogs.Add(log);
        await _dataLayer.SaveChangesAsync();

        return(requestServer.RequestId);
    }
Exemplo n.º 3
0
 public Task <Guid?> NewLog(string name, string message, string initiator, RequestServerBO requestServer, LogType logType = LogType.ApplicationServiceLog, GenericPriorityType priorityType = GenericPriorityType.Information)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
        public async Task <Guid?> NewLog(string name, string message, string initiator, RequestServerBO requestServer, LogType logType = LogType.ApplicationServiceLog, GenericPriorityType priorityType = GenericPriorityType.Information)
        {
            var log = new TblLog()
            {
                ApplicationId = requestServer.ApplicationId,
                Initiator     = initiator,
                Severity      = (short)priorityType,
                Message       = message,
                Name          = name,
                Type          = (short?)logType,
                Uuid          = requestServer.Guid.ToString()
            };

            _dataLayer.TblLogs.Add(log);
            await _dataLayer.SaveChangesAsync();

            return(requestServer.Guid);
        }
Exemplo n.º 5
0
        public async Task <Guid?> NewLog(string title, string message, Guid?guid = null, LogType logType = LogType.ApplicationServiceLog, GenericPriorityType priorityType = GenericPriorityType.Information)
        {
            guid ??= Guid.NewGuid();

            /*await MessageBusWrapper.Push(new StreamFlowMessageBO()
             * {
             *  StreamFlowService = new StreamFlowServiceBO()
             *  {
             *      Name = "RecordsService"
             *  },
             *  MethodName = "NewLog",
             *  Data = ""
             * });*/
            return(guid);
        }