Esempio n. 1
0
        public static int WriteException(Request request, string type, string message, string stacktrace)
        {
            int?   eventid    = null;
            string resultcode = null;

            Service service = ((Dictionary <string, Service>)HttpRuntime.Cache[Cache.CACHE_KEYS.Services])[request.ServiceKey];
            string  details = request.ToXml();

            using (LumberjackLinqDataContext db = new LumberjackLinqDataContext(ConfigurationManager.ConnectionStrings["LumberjackConnectionString"].ToString())) {
                db.xspWriteDirectException("Service", service.Name, service.Id, null, null, "Legion", request.Requestor.ClientIPAddress ?? request.Requestor.HostIPAddress, request.Requestor.HostIPAddress, type, message, details, stacktrace, ref eventid, ref resultcode);
            }

            return((int)eventid);
        }
Esempio n. 2
0
        public static int WriteException(string type, string message, string stacktrace, string details, string clientip, string hostip)
        {
            int?   eventid    = null;
            string resultcode = null;

            if (clientip == null)
            {
                clientip = ClientTools.IPAddress();
            }
            if (hostip == null)
            {
                hostip = ServerTools.IPv4Addresses.First().ToString();
            }

            using (LumberjackLinqDataContext db = new LumberjackLinqDataContext(ConfigurationManager.ConnectionStrings["LumberjackConnectionString"].ToString())) {
                db.xspWriteDirectException("Legion", "Core", 1, null, null, "Legion", clientip, hostip, type, message, details, stacktrace, ref eventid, ref resultcode);
            }

            return((int)eventid);
        }