I am using Xamarin (Xamarin.Android
, but also looking for a solution for Xamarin.iOS
) on Android and Serilog. Currently I am logging to a file liks this:
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug() // minimum log level that will be passed to sink
.WriteTo.File(new CompactJsonFormatter(), Path.Combine(Xamarin.Essentials.FileSystem.AppDataDirectory, "applog.json"))
.CreateLogger();
I then pull applog.json
manually from my android phone or emulator using adb
and ingest it to Seq.
Instead of this manual procedure I'd like to send the log data directly to Seq. However my mobile phone is not on the same network as my computer which runs Seq. Instead my phone is connected to my computer using an USB cable (Android debug mode). Is there any way to send the log data via USB to Seq on my computer? Can I configure some kind of network via USB?