/seq-client-portable

A portable (WP/iOS/Android) sink for Serilog that writes events over HTTP/S to Seq

Primary LanguageC#Apache License 2.0Apache-2.0

Seq.Client.Portable

Build status

A portable (WP/iOS/Android) sink for Serilog that writes events over HTTP/S to Seq. In time it's hoped that this will feed back into the "official" Seq client that ships as Serilog.Sinks.Seq.

The primary goal of this package is to provide great development-time logging, although there's nothing technically preventing this from being used on deployed devices.

To raise issues with this library please use the issue tracker here.

Usage

Install from NuGet:

Install-Package Seq.Client.Portable

Configure:

Log.Logger = new LoggerConfiguration()
  .WriteTo.SeqPortable("http://169.254.80.80:5341")
  .CreateLogger();

Log:

Log.Information("Hello Seq!");

Development-time Logging for Mobile Apps

Most mobile device emulators use a fixed IP address to identify the host machine that the emulator is running on.

Here's one possible configuration:

var serverUrl = Device.OnPlatform(
  WinPhone: "http://169.254.80.80:5341",
  Android: "http://10.0.2.2:5341",
  iOS: "http://my-seq.example.com");