コード例 #1
0
        private static string GetLogContents(IAppLogger fileLogger)
        {
            lock (fileLogger.LogLock)
            {
                fileLogger.SuspendWriter();

                try
                {
                    return(File.ReadAllText(fileLogger.LogPath));
                }
                finally
                {
                    fileLogger.ResumeWriter();
                }
            }
        }