In microservice architectures, there is a common requirement to send log files to a centralized logging service so that they can be stored and queried together. A popular choice for this is open source Elastic products, commonly referred to as the ELK Stack. Log messages are indexed into Elasticsearch also Kibana can be used as a data visualization tool to rapidly filter and search across the combined log messages.
In this sample project you can find how to include Serilog, which is a popular Loggin library in .NET into your project. In order to use the example project you need up and running Elastic and Kibana instances.