Beispiel #1
0
        public static void AddServerLog(string type, Exception exception, string endPoint = null, string originUser = null)
        {
            ServerLog log = new ServerLog();

            log.Type       = type;
            log.Message    = exception.ToString();
            log.StackTrace = exception.StackTrace;
            log.OriginUser = originUser;
            log.EndPoint   = endPoint;
            log.Created    = DateTime.UtcNow;
            log.InsertSync();
            pushToCloudWatch(log);
        }