Serilog sink for Glimpse
Glimpse is a plugin for ASP.NET that renders server-side request information directly in the browser, in much the same way as Firebug or Google Chrome Developer Tools show client-side information.
With Glimpse and the Serilog Glimpse Sink installed in an ASP.NET project:
PM> Install-Package Glimpse.AspNet
PM> Install-Package Serilog.Sinks.Glimpse
And configured in Global.asax:
Log.Logger = new LoggerConfiguration()
.WriteTo.Glimpse()
.CreateLogger();
Log messages written to Serilog will appear in a new Serilog tab in the Glimpse UI:
Serilog and Glimpse are a great match – when structured objects are used in Serilog events, Glimpse can render them in a nice expandable tree format.
Thanks to the awesome Robert Wagner for kicking off the Glimpse Sink.
More fresh Serilog updates…
WriteTo.Observers()
This tiny new sink in the core Serilog package supports processing Serilog events using Reactive Extensions for .NET (Rx).
var log = new LoggerConfiguration()
.WriteTo.Observers(events => events
.Do(evt => { Console.WriteLine(evt.Timestamp); })
.Subscribe())
.CreateLogger();
Rx enables some very interesting event processing scenarios on top of Serilog, which I hope to write more about in the future.
Serilog.Extras.Topshelf
A logging integration for the Topshelf Windows service hosting framework. To get started, first install the package:
PM> Install-Package Serilog.Extras.Topshelf
Before running the Topshelf host factory, set up the logger:
HostLogger.UseLogger(new SerilogHostLoggerConfigurator());
Serilog.Web renamed to Serilog.Extras.Web
The Serilog.Web package, providing some helpers for use with ASP.NET, has been renamed Serilog.Extras.Web – as in the Autofac project, we’re going to use the Extras designation to keep clear what is part of the core Serilog package, and what is provided and supported as a best-effort contribution.