Lowest available log level for notifications like a successful operation or debug output.
View code on GitHub Namespace: DeltaEngine.CoreAssembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
public static void Info(
string message
)
public static void Info(
string message
)
Public Shared Sub Info (
message As String
)
Public Shared Sub Info (
message As String
)
public:
static void Info(
String^ message
)
public:
static void Info(
String^ message
)
static member Info :
message : string -> unit
static member Info :
message : string -> unit
Tests:
DeltaEngine.Tests.Core.LoggerTests3 unit tests call DeltaEngine.Core.Logger.Info(System.String)
[Test]
public void LogInfoMessage()
{
using (var logger = new MockLogger())
{
Assert.IsEmpty(logger.LastMessage);
Logger.Info("Hello");
Assert.AreEqual("Hello", logger.LastMessage);
Assert.AreEqual(0, logger.NumberOfRepeatedMessagesIgnored);
}
}
[Test]
public void LogInfoMessage()
{
using (var logger = new MockLogger())
{
Assert.IsEmpty(logger.LastMessage);
Logger.Info("Hello");
Assert.AreEqual("Hello", logger.LastMessage);
Assert.AreEqual(0, logger.NumberOfRepeatedMessagesIgnored);
}
}
[Test]
public void LogSameMessageMultipleTimes()
{
using (var logger = new MockLogger())
{
Logger.Info("Hello");
Logger.Info("Hello");
Assert.AreEqual(1, logger.NumberOfRepeatedMessagesIgnored);
}
}
[Test]
public void LogSameMessageMultipleTimes()
{
using (var logger = new MockLogger())
{
Logger.Info("Hello");
Logger.Info("Hello");
Assert.AreEqual(1, logger.NumberOfRepeatedMessagesIgnored);
}
}
[Test]
public void RegisteringLoggerInTheSameThreadTwiceIsNotAllowed()
{
using (new SameThreadLogger())
{
Logger.Info("La la la");
Assert.Throws<Logger.LoggerWasAlreadyAttached>(() => { using (new SameThreadLogger()) {} });
}
[Test]
public void RegisteringLoggerInTheSameThreadTwiceIsNotAllowed()
{
using (new SameThreadLogger())
{
Logger.Info("La la la");
Assert.Throws<Logger.LoggerWasAlreadyAttached>(() => { using (new SameThreadLogger()) {} });
}