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         = 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));
        }
Exemple #2
0
 static Storage()
 {
     try
     {
         TrinityConfig.LoadTrinityConfig();
     }
     catch
     {
         Log.WriteLine(LogLevel.Error, "Failure to load config file, falling back to default Storage behavior");
     }
 }
Exemple #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();
 }
Exemple #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();
 }
Exemple #6
0
 static Storage()
 {
     TrinityConfig.LoadTrinityConfig();
 }
Exemple #7
0
 static LocalMemoryStorage()
 {
     TrinityC.Init();
     TrinityConfig.LoadTrinityConfig();
     //BackgroundThread.StartMemoryStorageBgThreads();
 }