using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tango.Logging
{
///
/// Represents a library logger for routing logs to the Visual Studio output window.
///
public class VSOutputLogger : ILogger
{
///
/// Initializes a new instance of the class.
///
public VSOutputLogger()
{
Immediate = true;
Enabled = true;
}
///
/// Called when a new library trace is available.
///
/// The output.
public void OnLog(LogItemBase output)
{
Debug.WriteLine(output.ToString());
}
private bool _isEnabled;
///
/// Gets or sets a value indicating whether this is enabled.
///
public bool Enabled
{
get
{
return _isEnabled;
}
set
{
_isEnabled = value;
}
}
///
/// Gets or sets a value indicating whether this will be notified about logs without waiting for the logs queue.
///
public bool Immediate { get; set; }
}
}