• Stars
    star
    207
  • Rank 189,769 (Top 4 %)
  • Language
    C#
  • License
    MIT License
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple Serilog log viewer UI for several sinks.

serilog-ui GitHub release (latest by date)

DotNET-build DotNET Coverage Quality Gate Status

JS-build Coverage Quality Gate Status

A simple Serilog log viewer for the following sinks:

  • Serilog.Sinks.MSSqlServer (Nuget)
  • Serilog.Sinks.MySql (Nuget)
  • Serilog.Sinks.Postgresql (Nuget)
  • Serilog.Sinks.MongoDB (Nuget)
  • Serilog.Sinks.ElasticSearch (Nuget)

Read the Wiki πŸ“˜

Quick Start πŸ’¨

Nuget packages installation

Install the Serilog.UI NuGet package:

# using dotnet cli
dotnet add package Serilog.UI

# using package manager:
Install-Package Serilog.UI

Install one of the available providers, based upon your sink:

Provider install: dotnet install: pkg manager
Serilog.UI.MsSqlServerProvider [NuGet] dotnet add package Serilog.UI.MsSqlServerProvider Install-Package Serilog.UI.MsSqlServerProvider
Serilog.UI.MySqlProvider [NuGet] dotnet add package Serilog.UI.MySqlProvider Install-Package Serilog.UI.MySqlProvider
Serilog.UI.PostgreSqlProvider [NuGet] dotnet add package Serilog.UI.PostgreSqlProvider Install-Package Serilog.UI.PostgreSqlProvider
Serilog.UI.MongoDbProvider [NuGet] dotnet add package Serilog.UI.MongoDbProvider Install-Package Serilog.UI.MongoDbProvider
Serilog.UI.ElasticSearchProvider [NuGet] dotnet add package Serilog.UI.ElasticSearchProvider Install-Package Serilog.UI.ElasticSearcProvider

DI registration

Add AddSerilogUi() to IServiceCollection in your Startup.ConfigureServices method:

public void ConfigureServices(IServiceCollection services)
{
    // Register the serilog UI services
    services.AddSerilogUi(options => 
      // each provider exposes extension methods to configure.
      // example with MSSqlServerProvider:
      options.UseSqlServer("ConnectionString", "LogTableName"));
}

In the Startup.Configure method, enable the middleware to serve the log UI pagee. Note: call to the UseSerilogUi middleware must be placed after any Authentication and Authorization middleware, otherwise the authentication may not work:

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    (...)

    app.UseRouting();
    app.UseAuthentication();
    app.UseAuthorization();
        
    // Enable middleware to serve log-ui (HTML, JS, CSS, etc.).
    app.UseSerilogUi();

    (...)

    app.UseEndpoints(endpoints =>
    {
        endpoints.MapControllerRoute(
            name: "default",
            pattern: "{controller=Home}/{action=Index}/{id?}");
    });
}

For further configuration: ⏩

Running the Tests: πŸ§ͺ

License

See LICENSE.

Issues and Contribution

Everything is welcome! πŸ† See the contribution guidelines for details.

More Repositories

1

serilog-sinks-elasticsearch

A Serilog sink that writes events to Elasticsearch
C#
434
star
2

serilog-sinks-applicationinsights

A Serilog sink that writes events to Microsoft Azure Application Insights
C#
219
star
3

serilog-sinks-grafana-loki

A Serilog sink sending log events to Grafana Loki
C#
188
star
4

Serilog.Enrichers.Sensitive

A Serilog LogEvent enricher that masks sensitive data
C#
112
star
5

serilog-sinks-richtextbox

A Serilog sink that writes log events to a WPF RichTextBox control with colors and theme support
C#
97
star
6

serilog-enrichers-clientinfo

Enrich logs with client IP, correlation id and HTTP request headers.
C#
90
star
7

serilog-sinks-graylog

Serilog sink for graylog
C#
81
star
8

serilog-sinks-notepad

A Serilog sink that writes log events to Notepad as text or JSON
C#
61
star
9

Serilog.Sinks.Postgresql.Alternative

Serilog.Sinks.Postgresql.Alternative is a library to save logging information from https://github.com/serilog/serilog to https://www.postgresql.org/.
C#
59
star
10

SerilogSinksInMemory

In-memory sink for Serilog to use for testing
C#
53
star
11

serilog-sinks-splunk

A Serilog sink that writes to Splunk
C#
45
star
12

serilog-sinks-slack

A simple (yet customizable) Slack logging sink for Serilog
C#
41
star
13

serilog-sinks-azuretablestorage

A Serilog sink that writes events to Azure Table Storage
C#
40
star
14

serilog-sinks-sentry

A Sentry sink for Serilog
C#
36
star
15

Serilog.Sinks.Telegram.Alternative

Serilog.Sinks.Telegram.Alternative is a library to save logging information from Serilog to Telegram.
C#
35
star
16

Serilog.Sinks.MicrosoftTeams.Alternative

Serilog.Sinks.MicrosoftTeams.Alternative is a library to save logging information from Serilog to Microsoft Teams.
C#
30
star
17

serilog-sinks-slackclient

Slack Sink for Serilog
C#
27
star
18

serilog-diagnostics-tracelistener

A System.Diagnostics.TraceListener that writes trace data into Serilog
C#
25
star
19

serilog-enrichers-globallogcontext

A Serilog Enricher for adding properties to all log events in your app
C#
25
star
20

Serilog.Sinks.AmazonS3

Serilog.Sinks.AmazonS3 is a library to save logging information from Serilog to Amazon S3. The idea there was to upload log files to Amazon S3 to later evaluate them with Amazon EMR services.
C#
21
star
21

serilog-sinks-teams

A Serilog event sink that writes to Microsoft Teams
C#
18
star
22

Serilog-Sinks-Discord

Serilog discord sink
C#
17
star
23

Serilog.Sinks.Network

A serilog network sink. Designed with logstash and the Elastic stack in mind
C#
16
star
24

home

This is the hub for all the projects that are part of the Serilog Contrib Organization
16
star
25

Serilog.Sinks.Logz.Io

C#
16
star
26

serilog-sinks-exceldnalogdisplay

A Serilog sink that writes events to Excel-DNA LogDisplay
C#
13
star
27

serilog-sinks-azureeventhub

A Serilog sink that writes events to Azure EventHubs
C#
13
star
28

serilog-sinks-rollbar

A Serilog sink which writes events to Rollbar
C#
10
star
29

Serilog.Logfmt

Simple Serilog formatter to output Logfmt
C#
9
star
30

serilog-enrichers-exceldna

A Serilog Enricher with properties from Excel-DNA add-ins
C#
6
star
31

serilog-enrichers-memory

An enricher for Serilog which outputs memory usage
C#
6
star
32

serilog-sinks-apachekafka

A sink for Serilog that writes events to Kafka
C#
6
star
33

serilog-sinks-msbuild

An MSBuild sink for Serilog.
C#
5
star
34

serilog-settings-xml

Xml file based configuration for Serilog (https://serilog.net)
C#
5
star
35

serilog-sinks-OnePageSink

Sink that displays real-time messages from Serilog in a separate web page. Uses SignalR as a transport. Stores nothing, uses no memory. If you refresh your page you will lose your messages
C#
4
star
36

serilog-formatting-log4net

Format Serilog events in log4net or log4j compatible XML format
C#
4
star
37

Serilog.Sinks.DelegatingText

A Serilog sink to emit formatted log events to a delegate.
C#
3
star
38

brand

Guide and reference to designers, writers, and developers to create consistent, on-brand content for Serilog
2
star
39

serilog-sinks-youtrack

A Serilog sink that writes events to YouTrack
C#
2
star
40

Serilog.Enrichers.ActivityTags

C#
1
star
41

Serilog.Sinks.Logcat

Android logcat sink extension for the Serilog logger
C#
1
star
42

Serilog.Enrichers.ApplicationName

PowerShell
1
star
43

serilog-sinks-amqp-batching

C#
1
star
44

serilog-settings-xml2

A Serilog settings provider that reads from XML sources with zero dependencies and full configuration support
C#
1
star