public LogToFileBehavior(StreamWriter writer, IMessageFormatBehavior messageFormatBehavior, string logPath = @".\Log") { MessageFormatBehavior = messageFormatBehavior; _logPath = logPath; _initDate = DateTime.Now; if (!Directory.Exists(_logPath)) { Directory.CreateDirectory(_logPath); } StartLogging(writer ?? OpenFile(Path.Combine(_logPath, _initDate.ToString("yyyy-MM-dd_HH-mm-ss")) + ".txt")); }
public LogToDebugViewBehavior(IMessageFormatBehavior messageFormatBehavior) { _initDate = DateTime.Now; MessageFormatBehavior = messageFormatBehavior; }
public LogToFileBehavior(IMessageFormatBehavior messageFormatBehavior, string logPath = @".\Log") : this(null, messageFormatBehavior, logPath) { }
public LogToConsoleBehavior(IMessageFormatBehavior messageFormatBehavior) { MessageFormatBehavior = messageFormatBehavior; _initDate = DateTime.Now; }