I couldn't found any loggers for windows 10 universal app, i have tried out log4net, Microsoft enterprise library, Nlog but none of them are supported in windows 10 Universal platform.
Can anyone suggest me good logger for the windows 10 UWP?
Debug an installed UWP app on a local machineIn Visual Studio, select Debug > Other Debug Targets > Debug Installed App Package. In the Debug Installed App Package dialog, under Connection Type, select Local Machine. Under Installed App Packages, select the app you want to debug, or type its name in the search box.
However, in a Universal Windows Platform application, access to the Registry is forbidden.
Universal Windows Platform (UWP) apps (formerly Windows Store apps and Metro-style apps) are applications that can be used across all compatible Microsoft Windows devices, including personal computers (PCs), tablets, smartphones, Xbox One, Microsoft HoloLens, and Internet of Things.
UWP is one choice for creating apps that run on Windows 10 and Windows 11 devices, and can be combined with other platforms.
Have you tried MetroLog? You can install it using NuGet:
Install-Package MetroLog
Here's an quick example:
using MetroLog; using MetroLog.Targets; LogManagerFactory.DefaultConfiguration.AddTarget(LogLevel.Trace, LogLevel.Fatal, new FileStreamingTarget()); ILogger log = LogManagerFactory.DefaultLogManager.GetLogger<MainPage>(); log.Trace("This is a trace message.");
You can find a tutorial explaining how to add it on your project at http://talkitbr.com/2015/06/11/adicionando-logs-em-universal-apps. Also there is an explanation regarding retrieving these logs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With