private static string GetLogContents(IAppLogger fileLogger) { lock (fileLogger.LogLock) { fileLogger.SuspendWriter(); try { return(File.ReadAllText(fileLogger.LogPath)); } finally { fileLogger.ResumeWriter(); } } }