示例#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         = AppDomain.CurrentDomain.GetAssemblies()
                                          .Any(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));
        }
示例#2
0
 static Storage()
 {
     try
     {
         TrinityConfig.LoadTrinityConfig();
     }
     catch
     {
         Log.WriteLine(LogLevel.Error, "Failure to load config file, falling back to default Storage behavior");
     }
 }
示例#3
0
 static LocalMemoryStorage()
 {
     TrinityC.Init();
     try
     {
         TrinityConfig.LoadTrinityConfig();
     }
     catch
     {
         Log.WriteLine(LogLevel.Error, "Failure to load config file, falling back to default LocalMemoryStorage behavior");
     }
     CSynchronizeStorageRoot();
 }
示例#4
0
        static Log()
        {
            TrinityC.Init();
            try
            {
                TrinityConfig.LoadTrinityConfig();
            }
            catch
            {
                Log.WriteLine(LogLevel.Error, "Failure to load config file, falling back to default log behavior");
            }

            BackgroundThread.AddBackgroundTask(new BackgroundTask(CollectLogEntries, c_LogEntryCollectorIdleInterval));
        }
 static LocalMemoryStorage()
 {
     InternalCalls.__init();
     TrinityConfig.LoadTrinityConfig();
     //BackgroundThread.StartMemoryStorageBgThreads();
 }
示例#6
0
 static Storage()
 {
     TrinityConfig.LoadTrinityConfig();
 }
示例#7
0
 static LocalMemoryStorage()
 {
     TrinityC.Init();
     TrinityConfig.LoadTrinityConfig();
     //BackgroundThread.StartMemoryStorageBgThreads();
 }