diff --git a/DTLib.Logging/Loggers/CompositeLogger.cs b/DTLib.Logging/Loggers/CompositeLogger.cs index ecadf13..1330a05 100644 --- a/DTLib.Logging/Loggers/CompositeLogger.cs +++ b/DTLib.Logging/Loggers/CompositeLogger.cs @@ -52,7 +52,12 @@ public class CompositeLogger : ILogger public ILogFormat Format { get; } protected ILogger[] _loggers; - private bool _debugLogEnabled = false; + private bool _debugLogEnabled = +#if DEBUG + true; +#else + false; +#endif private bool _infoLogEnabled = true; private bool _warnLogEnabled = true; private bool _errorLogenabled = true; diff --git a/DTLib.Logging/Loggers/ConsoleLogger.cs b/DTLib.Logging/Loggers/ConsoleLogger.cs index 3ffe8dd..251a996 100644 --- a/DTLib.Logging/Loggers/ConsoleLogger.cs +++ b/DTLib.Logging/Loggers/ConsoleLogger.cs @@ -3,7 +3,12 @@ // вывод лога в консоль и файл public class ConsoleLogger : ILogger { - public bool DebugLogEnabled { get; set; } = false; + public bool DebugLogEnabled { get; set; } = +#if DEBUG + true; +#else + false; +#endif public bool InfoLogEnabled { get; set; } = true; public bool WarnLogEnabled { get; set; } = true; public bool ErrorLogenabled { get; set; } = true; diff --git a/DTLib.Logging/Loggers/FileLogger.cs b/DTLib.Logging/Loggers/FileLogger.cs index 459d3c6..0736c21 100644 --- a/DTLib.Logging/Loggers/FileLogger.cs +++ b/DTLib.Logging/Loggers/FileLogger.cs @@ -2,7 +2,12 @@ public class FileLogger : ILogger { - public bool DebugLogEnabled { get; set; } = false; + public bool DebugLogEnabled { get; set; } = +#if DEBUG + true; +#else + false; +#endif public bool InfoLogEnabled { get; set; } = true; public bool WarnLogEnabled { get; set; } = true; public bool ErrorLogenabled { get; set; } = true;