Exemple #1
0
        static Log()
        {
            TrinityC.Init();
            try
            {
                TrinityConfig.LoadTrinityConfig();
            }
            catch
            {
                Log.WriteLine(LogLevel.Error, "Failure to load config file, falling back to default log behavior");
            }

            string unitTestAssemblyName = "Microsoft.VisualStudio.QualityTools.UnitTestFramework";
            bool   isInUnitTest         = AssemblyUtility.AnyAssembly(a => a.FullName.StartsWith(unitTestAssemblyName, StringComparison.Ordinal));

            if (isInUnitTest)
            {
                WriteLine(LogLevel.Info, "UnitTestFramework detected. Enabling echo callback.");
                var LogFilename = Path.Combine(TrinityConfig.LogDirectory, "trinity-[" + DateTime.Now.ToStringForFilename() + "].log");
                new Thread(_unitTestLogEchoThread).Start(LogFilename);
            }

            BackgroundThread.AddBackgroundTask(new BackgroundTask(CollectLogEntries, c_LogEntryCollectorIdleInterval));
        }
 public void DynamicClusterAssemblyIsFound()
 {
     Assert.IsTrue(AssemblyUtility.AnyAssembly(a => a.FullName.Contains("DynamicCluster")));
 }