Esempio n. 1
0
        public LogAuditoria(string identifier, string message, string detail, LogSourceEnum source, LogTypeEnum type)
        {
            Id = Guid.NewGuid();

            Identifier = identifier;
            Message    = message;
            Detail     = detail;
            Source     = source.ToString();
            Type       = type.ToString();
            Data       = DateTime.Now;
        }
Esempio n. 2
0
        public async Task <Guid> SaveAuditAsync(string identifier, string message, string detail, LogSourceEnum source, LogTypeEnum type)
        {
            var model = new LogAuditoria(identifier, message, detail, source, type);
            await _logAudit.AddAsync(model);

            return(model.Id);
        }
Esempio n. 3
0
            public static LogAuditoria NewLogAuditoriaFull(string identifier, string message, string detail, LogSourceEnum source, LogTypeEnum type, string user, string hostname, string url, string controller, string method, int statusCode, string cookies, string serverVariables)
            {
                var logAudit = new LogAuditoria()
                {
                    Id   = Guid.NewGuid(),
                    Data = DateTime.Now,

                    Identifier      = identifier,
                    Message         = message,
                    Detail          = detail,
                    Source          = source.ToString(),
                    Type            = type.ToString(),
                    User            = user,
                    Hostname        = hostname,
                    Url             = url,
                    Controller      = controller,
                    Method          = method,
                    StatusCode      = statusCode,
                    Cookies         = cookies,
                    ServerVariables = serverVariables
                };

                return(logAudit);
            }