Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/fantasticfiasco/serilog-sinks-http-sample-dotnet-core
- Owner: FantasticFiasco
- License: apache-2.0
- Created: 2018-05-01T12:02:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-27T03:12:07.000Z (4 months ago)
- Last Synced: 2024-07-27T04:25:42.081Z (4 months ago)
- Topics: http, sample, serilog, sinks
- Language: C#
- Homepage:
- Size: 465 KB
- Stars: 11
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
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).