Example #1
0
        public void LogInfo(string message)
        {
            var entity = new ErrorLogg();

            entity.DateOf   = DateTime.Now;
            entity.LogLevel = "Info";
            entity.Message  = message;
            entity.Stack    = "";
            _Context.Set <ErrorLogg>().Add(entity);
            _Context.SaveChanges();
        }
Example #2
0
        public void LogError(Exception ex, string message)
        {
            var entity = new ErrorLogg();

            entity.DateOf   = DateTime.Now;
            entity.LogLevel = "Error";
            entity.Message  = message;
            entity.Stack    = ex.ToString();
            _Context.Set <ErrorLogg>().Add(entity);
            _Context.SaveChanges();
        }