Logger Warning Method (String)Delta Engine Documentation
If something bad happened but we can continue this type of message is logged. View code on GitHub

Namespace: DeltaEngine.Core
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public static void Warning(
	string message
)
Remarks

Tests: DeltaEngine.Tests.Core.LoggerTests
Examples

2 unit tests call DeltaEngine.Core.Logger.Warning(System.String)
[Test]
public void LogWarning()
{
    using (var logger = new MockLogger())
    {
        Logger.Warning("Ohoh");
        Assert.AreEqual("Ohoh", logger.LastMessage);
        Logger.Warning(new NullReferenceException());
        Assert.IsTrue(logger.LastMessage.Contains("NullReferenceException"));
    }
}
[Test]
public void IfNoLoggerIsAttachedWeGetAWarning()
{
    const string Warning = "Ohoh";
    const string Message = "No loggers have been created for this message: " + Warning;
    var defaultOut = Console.Out;
    var console = new StringWriter();
    Console.SetOut(console);
    Logger.Warning(Warning);
    Assert.IsTrue(console.ToString().Contains(Message), console.ToString());
    Console.SetOut(defaultOut);
    console.Dispose();
}
See Also