From 194141a167f8df75cfc2384305248ba894437765 Mon Sep 17 00:00:00 2001 From: Aleksbgbg Date: Sat, 12 May 2018 19:08:14 +0100 Subject: [PATCH] [DebugLogger] Remove DebugLogger. --- YouTube Downloader/Core/Debug/DebugLogger.cs | 60 -------------------- YouTube Downloader/YouTube Downloader.csproj | 1 - 2 files changed, 61 deletions(-) delete mode 100644 YouTube Downloader/Core/Debug/DebugLogger.cs diff --git a/YouTube Downloader/Core/Debug/DebugLogger.cs b/YouTube Downloader/Core/Debug/DebugLogger.cs deleted file mode 100644 index 8fa491d..0000000 --- a/YouTube Downloader/Core/Debug/DebugLogger.cs +++ /dev/null @@ -1,60 +0,0 @@ -#if DEBUG -namespace YouTube.Downloader.Core.Debug -{ - using System; - using System.Globalization; - using System.IO; - - internal sealed class DebugLogger : IDisposable - { - private readonly StreamWriter _fileStreamWriter; - - static DebugLogger() - { - if (!Directory.Exists("Debug")) - { - Directory.CreateDirectory("Debug"); - } - } - - internal DebugLogger() - { - _fileStreamWriter = new StreamWriter($"Debug/{DateTime.Now.ToString(CultureInfo.InvariantCulture).Replace('/', '-').Replace(':', '-')}.log") - { - AutoFlush = true - }; - } - - internal void Log(string message) - { - Console.WriteLine(message); - _fileStreamWriter.WriteLine(message); - } - - internal void Exit() - { - _fileStreamWriter.Flush(); - _fileStreamWriter.Close(); - } - - ~DebugLogger() - { - Dispose(false); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - private void Dispose(bool disposing) - { - if (disposing) - { - _fileStreamWriter.Dispose(); - } - } - } -} -#endif // DEBUG \ No newline at end of file diff --git a/YouTube Downloader/YouTube Downloader.csproj b/YouTube Downloader/YouTube Downloader.csproj index 760e30e..51d349c 100644 --- a/YouTube Downloader/YouTube Downloader.csproj +++ b/YouTube Downloader/YouTube Downloader.csproj @@ -142,7 +142,6 @@ -