Published on

Centralized logging for .net core ABP microservices app using Seq. Part 8

Table of Contents


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'

    image: datalust/seq
      - 8003:80
      - 5341:5341
      - D:\docker\data\seq:/data
      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"))

This will post all the logs to the seq.

Sample Repo :