Skip to content

Instantly share code, notes, and snippets.

@dansiegel
Last active July 31, 2017 01:46
Show Gist options
  • Save dansiegel/13e2326c347c51f6a1d45d7b51649e22 to your computer and use it in GitHub Desktop.
Save dansiegel/13e2326c347c51f6a1d45d7b51649e22 to your computer and use it in GitHub Desktop.
Basic Prism Logging
namespace AwesomeApp
{
public partial App : PrismApplication
{
protected override ILoggerFacade CreateLogger() =>
new AwesomeApp.Services.DebugLogger();
}
}
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