Flush() private method

private Flush ( ) : void
return void
Exemplo n.º 1
0
    public void CanTrace()
    {
        var listener = new Listener();

        Trace.Listeners.Add(listener);
        try
        {
            var logger = new TraceDiagnosticLogger(SentryLevel.Debug);
            logger.Log(SentryLevel.Debug, "the message {0}", new Exception("the exception"), "arg1");
            Trace.Flush();
            Assert.Equal(@"  Debug: the message arg1
System.Exception: the exception", listener.Messages.Single());
        }
        finally
        {
            Trace.Listeners.Remove(listener);
        }
    }