- Published on
Centralized logging for .net core ABP microservices app using Seq. Part 8
Series: ABP Framework - Getting started
This post is part of the ABP Framework - Getting started series.
Table of Contents
Intro
In this post we will see how to implement a central logging system for your ABP app using Seq.
Deploy the Seq dockers container
Enable swarm mode
docker swarm init
Create the docker-compose file seq_stack.yaml
version: '3.2'
services:
seq:
image: datalust/seq
ports:
- 8003:80
- 5341:5341
volumes:
- D:\docker\data\seq:/data
environment:
ACCEPT_EULA: 'Y'
To deploy the stack
docker stack deploy -c seq_stack.yaml seq
This will deploy the seq docker container.
Create ABP Tired application
abp new SeqWithAbp -t app -u mvc --tiered
Once the app is created run the DbMigration project to setup the migrations and database seeding.
Install Seq Sink in the projects
Install the Serilog.Sinks.Seq nuget package to the following projects.
- SeqWithAbp.HttpApi.Host
- SeqWithAbp.IdentityServer
- SeqWithAbp.Web
Update the LoggerConfiguration in the Program.cs with the seq endpoint in all the projects.
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Seq("http://localhost:5341")
This will post all the logs to the seq.
Sample Repo : https://github.com/antosubash/SeqWithAbp
Related Posts
Continue reading with these related articles
Changing theme for your ABP app. Part 10
In this post we will explore how to change the theme for your ABP application.
Deploy ABP Framework dotnet core tiered app to docker swarm. Part 9
In this post we will see how to deploy your dotnet core app with docker container.
Extend Tenant management and add custom host to your ABP App. Part 7
In this post we will see how to extent the tenant entity and Add a custom tenant resolver for your ABP app.