Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fantasticfiasco/serilog-sinks-http-sample-dotnet-core

Sample application of Serilog.Sinks.Http producing log events in .NET Core.
https://github.com/fantasticfiasco/serilog-sinks-http-sample-dotnet-core

http sample serilog sinks

Last synced: 19 days ago
JSON representation

Sample application of Serilog.Sinks.Http producing log events in .NET Core.

Awesome Lists containing this project

README

        

# Serilog.Sinks.Http - Sample in .NET Core

[![CI](https://github.com/FantasticFiasco/serilog-sinks-http-sample-dotnet-core/actions/workflows/ci.yml/badge.svg)](https://github.com/FantasticFiasco/serilog-sinks-http-sample-dotnet-core/actions/workflows/ci.yml)

This repository contains a sample application of [Serilog.Sinks.Http](https://github.com/FantasticFiasco/serilog-sinks-http) producing log events sent over HTTP to a basic log server.

![Sample output](./assets/output.png)

## Running the application

1. Run `docker compose up`

What you will end up with is two containers, one producing log events while the other consumes the log events.

## Remarks

- The sample application is using a custom implementation of a HTTP client, mainly to show that it is possible to do so. But don't specify a custom implementation if you don't have to.
- The sink is configured in code, but could as well be configured in `appsettings.json` using [Serilog.Settings.Configuration](https://github.com/serilog/serilog-settings-configuration).