saleem-mirza / serilog-sinks-sqlite

A Serilog sink that writes to SQLite
Apache License 2.0
56 stars 44 forks source link

Null Reference exception thrown from CreateLogger #7

Closed rtompot closed 7 years ago

rtompot commented 7 years ago

Using Visual Studio 2015. To reproduce, create a new Cross-Platform Xamarin.Forms app. Install the latest Serilog nuget in the Portable, Android projects. Installl the latest Serilog-Sinks-SQLite nuget (3.8.3) into the Android project. Add the following logic to the MainActivity.cs file in the Android project, in the OnCreate method:

var logger = new LoggerConfiguration() .MinimumLevel.Debug() .WriteTo.SQLite(@"APSApp.db", "Logs") .CreateLogger(); //NullReferenceException thrown from this statement

PCL Profile is .NET Framework 4.5.1, Windows 8.1, Xamarin.Android, Xamarin.iOS, Xamarin.iOS (Classic), Xamarin.Mac

saleem-mirza commented 7 years ago

@rtompot, Sorry for trouble. Unfortunately, I don't have access to Xamarin so can't speak about it. However I have tested and confirm this sink work perfectly fine with .net 4.5.1 and above .

rtompot commented 7 years ago

Xamarin is freely available with Visual Studio

From: Saleem Mirza [mailto:notifications@github.com] Sent: Wednesday, April 12, 2017 5:23 PM To: saleem-mirza/serilog-sinks-sqlite serilog-sinks-sqlite@noreply.github.com Cc: Randy Tompot randy@tompotandassociates.com; Mention mention@noreply.github.com Subject: Re: [saleem-mirza/serilog-sinks-sqlite] Null Reference exception thrown from CreateLogger (#7)

@rtompot https://github.com/rtompot , Sorry for trouble. Unfortunately, I don't have access to Xamarin so can't speak about it. However I have tested and confirm this sink work perfectly fine with .net 4.5.1 and above .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saleem-mirza/serilog-sinks-sqlite/issues/7#issuecomment-293724290 , or mute the thread https://github.com/notifications/unsubscribe-auth/AJiZ3b_gJDdAHu7AhEFmhFCaOumTBAFRks5rvU6zgaJpZM4M776H . https://github.com/notifications/beacon/AJiZ3cta1S6RoqNXnlLWx9NojJJ5vkvXks5rvU6zgaJpZM4M776H.gif