Last active
July 31, 2017 01:46
-
-
Save dansiegel/13e2326c347c51f6a1d45d7b51649e22 to your computer and use it in GitHub Desktop.
Basic Prism Logging
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
namespace AwesomeApp | |
{ | |
public partial App : PrismApplication | |
{ | |
protected override ILoggerFacade CreateLogger() => | |
new AwesomeApp.Services.DebugLogger(); | |
} | |
} |
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
using Prism.Logging; | |
using static System.Diagnostics.Debug; | |
namespace AwesomeApp.Services | |
{ | |
public class DebugLogger : ILoggerFacade | |
{ | |
public void Log(string message, Category category, Priority priority) => | |
WriteLine($"{category} - {priority}: {message}"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment