简体   繁体   中英

C# Logger for UWP Application with Microsoft IoT

I tried to write a thread safe logger for my UWP Application in C# which runs on a Raspberry Pi with Microsoft IoT but I have no idea where to begin. I tried creating a file in the ApplicationData.Current.LocalFolder but the operations are all async and I can't await them in the lock body of my log method.

Thanks in advance for your help!

The easy way to do it is use nuget to install MetroLog or Serilog

MetroLog is a good way to log.

To use MetroLog that you should install MetroLog.

You can install MetroLog in nuget.

在此处输入图片说明

It's easy to use and you can see this link below.

Building a Universal Windows Platform (UWP) Application (Part 4) – Logging w/ MetroLog - Intertech Blog

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM