public FileLogger( ILogEntryFormatter logEntryFormatter, ILoggerSettingsRepository loggerSettingsRepository ) { _logEntryFormatter = logEntryFormatter; _loggerSettingsRepository = loggerSettingsRepository; }
public FileLogger( ILogEntryFormatter logEntryFormatter, ILoggerSettingsRepository loggerSettingsRepository ) : base(logEntryFormatter) { Settings = loggerSettingsRepository.Get(); lock (lockObj) { using (var streamWriter = new StreamWriter(GetFilePath(), false)) { streamWriter.WriteLine(string.Empty); streamWriter.Close(); } } }