Skip to content

Instantly share code, notes, and snippets.

@trentmswanson
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trentmswanson/9df9cecf89d79c9fd073 to your computer and use it in GitHub Desktop.
Save trentmswanson/9df9cecf89d79c9fd073 to your computer and use it in GitHub Desktop.
Semantic Logging Application Block Output Console to Debug
public class DebugWriter : StringWriter
{
public override void WriteLine(string value)
{
Debug.WriteLine(value);
}
//This is the one SLAB Console sink uses
public override void Write(string value)
{
Debug.Write(value);
}
}
//Redirect to Console
Console.SetOut(new DebugWriter());
//Listner setup snippet
listener = new ObservableEventListener();
listener.EnableEvents(FullScale180WebEvents.Log, EventLevel.LogAlways, ~EventKeywords.None);
listener.LogToConsole();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment