public static void TestTrace() { FileLog backupFileLog = new FileLog("TestBackupLog", "", enumEventPriority.All); LoggingMgr lm = new LoggingMgr( new List <ILoggingTarget>() { new WindowsEventLog("Application", "LoggingTest", backupFileLog, enumEventPriority.Critical), }, backupFileLog, enumTraceLevel.All); TraceLog log = new TraceLog(); lm.TraceToWindow = true; int n = 0; while (true) { using (new LoggingContext("Running Trace Test")) { lm.Trace(@"Number: " + n.ToString()); n++; LoggingTest.TraceDeep1(lm); LoggingTest.TraceLargeMessage(lm); System.Threading.Thread.Sleep(1); } } }
static void Main(string[] args) { //CachingTest.RunTest(); // Test the configuration API //?? ConfigurationTest.RunTest(); if (args.Count() > 0 && args.Contains("-t")) { LoggingTest.TestTrace(); } }