Last active
August 29, 2015 14:03
-
-
Save trentmswanson/9df9cecf89d79c9fd073 to your computer and use it in GitHub Desktop.
Semantic Logging Application Block Output Console to Debug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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