using System;
using Swan.Lite.Logging;
namespace Swan.Logging {
///
/// Represents a logger target. This target will write to the
/// Debug console using System.Diagnostics.Debug.
///
///
// [Obsolete("NEED", false)]
public class DebugLogger : TextLogger, ILogger {
///
/// Initializes a new instance of the class.
///
protected DebugLogger() {
// Empty
}
///
/// Gets the current instance of DebugLogger.
///
///
/// The instance.
///
public static DebugLogger Instance { get; } = new DebugLogger();
///
/// Gets a value indicating whether a debugger is attached.
///
///
/// true if this instance is debugger attached; otherwise, false.
///
public static Boolean IsDebuggerAttached => System.Diagnostics.Debugger.IsAttached;
///
public LogLevel LogLevel { get; set; } = IsDebuggerAttached ? LogLevel.Trace : LogLevel.None;
///
// [Obsolete("NEED", false)]
public void Log(LogMessageReceivedEventArgs logEvent) {
(String outputMessage, ConsoleColor _) = this.GetOutputAndColor(logEvent);
System.Diagnostics.Debug.Write(outputMessage);
}
///
public void Dispose() {
// do nothing
}
}
}