Exemplo n.º 1
0
        private static IDisposable StartHttpSysTracing(string path)
        {
            var  httpSysLoggingEnabledValue = ConfigurationManager.AppSettings["httpSysLoggingEnabled"];
            bool httpSysLoggingEnabled;

            if (!Boolean.TryParse(httpSysLoggingEnabledValue, out httpSysLoggingEnabled) ||
                !httpSysLoggingEnabled)
            {
                return(null);
            }

            var etw = new HttpSysEtwWrapper(path);

            if (etw.StartLogging())
            {
                return(etw);
            }

            return(null);
        }
Exemplo n.º 2
0
        private static IDisposable StartHttpSysTracing(string path)
        {
            var httpSysLoggingEnabledValue = ConfigurationManager.AppSettings["httpSysLoggingEnabled"];
            bool httpSysLoggingEnabled;

            if (!Boolean.TryParse(httpSysLoggingEnabledValue, out httpSysLoggingEnabled) ||
                !httpSysLoggingEnabled)
            {
                return null;
            }

            var etw = new HttpSysEtwWrapper(path);
            if (etw.StartLogging())
            {
                return etw;
            }

            return null;
        }