Esempio n. 1
0
        /// <summary>
        /// 同时写xml日志和性能日志
        /// </summary>
        private void WriteXmlPerformanceLog()
        {
            if (IsWriteToLogSystem)
            {
                _XmlLog.SystemCode  = SystemCode;
                _XmlLog.ClassName   = ClassName;
                _XmlLog.MethodName  = MethodName;
                _XmlLog.MethodCName = MethodCName;
                _XmlLog.RQ          = RequestXml;
                _XmlLog.RS          = ResponseXml;
                _XmlLog.Remark      = "SSharing.Proxy";

                _PerfLog.SystemCode  = SystemCode;
                _PerfLog.ClassName   = ClassName;
                _PerfLog.MethodName  = MethodName;
                _PerfLog.MethodCName = MethodCName;
                _PerfLog.Remark      = "SSharing.Proxy";

                var xmlPerformanceLog = new XmlPerformanceLog()
                {
                    XmlLog         = new XmlLog(),
                    PerformanceLog = new PerformanceLog()
                };
                xmlPerformanceLog.XmlLog         = _XmlLog;
                xmlPerformanceLog.PerformanceLog = _PerfLog;
                LogClientHelper.XmlPerformance(xmlPerformanceLog);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 同时写xml日志和性能日志
        /// </summary>
        /// <param name="xmlPerformanceLog"></param>
        public static void XmlPerformance(XmlPerformanceLog xmlPerformanceLog)
        {
            var list = new List <XmlPerformanceLog>();

            list.Add(xmlPerformanceLog);
            var data = list.ToJson();

            HttpHelper.Post(xmlPerformanceLog.Url, data);
        }