Christoph
Christoph

Reputation: 333

Metrolog on Raspberry Pi

I'm using Windows 10 IOT on my Raspberry Pi 3.

Since my Application is growing I'd like to include a logger to the application. So I've implemented MetroLog for this purpose.

Starting the application on my local computer the logging works fine and it stores the lof files under this path

C:\Users\[login]\AppData\Local\Packages\[package family name]\LocalState\MetroLogs

If I start the application on the Raspberry Pi the logger does not write any log files or I just can't find it. The folder described above does not exist on the Raspberry Pi.

Has anyone implemented MetroLog for Win10 IOT apps? Or can I change the default path where the log files are stored?

Upvotes: 0

Views: 250

Answers (1)

Rita Han
Rita Han

Reputation: 9700

On windows iot core device the path looks like this:

C:\Data\Users\DefaultAccount\AppData\Local\Packages\[package family name]\LocalState\MetroLogs

I test with the following code piece:

        this.Log = Logger.GetLogger("myLogger");
        System.Diagnostics.Debug.WriteLine("Error log files are written to: " + ApplicationData.Current.LocalFolder.Path);
        this.Log.Debug("This is a debug message.");

Upvotes: 2

Related Questions