Writes into a log text file and opens it in a editor after execution.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Core Logger
DeltaEngine.Logging TextFileLogger
Namespace: DeltaEngine.Logging
Assembly: DeltaEngine.Logging (in DeltaEngine.Logging.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The TextFileLogger type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TextFileLogger | Initializes a new instance of the TextFileLogger class |
Methods
Name | Description | |
---|---|---|
CreateMessageTypePrefix | (Inherited from Logger.) | |
Dispose | Releases all resources used by the TextFileLogger (Overrides Logger Dispose .) | |
Write | (Overrides Logger Write(Logger MessageType, String).) |
Properties
Name | Description | |
---|---|---|
LastMessage | (Inherited from Logger.) | |
NumberOfRepeatedMessagesIgnored | (Inherited from Logger.) |
Remarks
Examples
[Test] public void WhenThereWasNoLoggingNoFileIsCreated() { Assert.IsFalse(File.Exists(LogFilePath)); }
[Test] public void LogInfoAndOpenFile() { logger.Write(Logger.MessageType.Info, "Test for logging info"); }
[Test] public void LogTwoMessagesAndOpenFile() { logger.Write(Logger.MessageType.Info, "Info message 1"); logger.Write(Logger.MessageType.Info, "Info message 2"); }
See Also