public void AllTest() { TraceLogger c1 = TraceLogger.Setup("ExTest", 0); c1.Verbose("this is {0}", "verbose"); c1.Start("starting logical operation"); c1.Verbose("this a test for all and this is verbose output"); c1.Verbose("this the same test with info output"); try { c1.Warn("this might throw an exception"); var v1 = System.IO.File.Open("c:\\hack.dll", System.IO.FileMode.Open); } catch (Exception ex) { c1.Error("this is the exception message {0}", ex.Message); c1.LogException(ex); c1.LogException <Exception>(ex); } c1.Stop("Stopping logical operation"); Assert.AreEqual(1, 1); }
public void LogTest() { TraceLogger c1 = TraceLogger.Setup("ExTest", 0); try { var v1 = System.IO.File.Open("c:\\hack.dll", System.IO.FileMode.Open); } catch (Exception ex) { c1.LogException(ex); } Assert.AreEqual(1, 1); }