Top "Serilog" questions

Serilog is a .NET library which provides diagnostic logging to files, the console, and so-on.

Serilog RollingFile

I am trying to use WriteTo.RollingFile with Serilog as the following to write one file per day: var log = …

c# .net serilog
Configuring Serilog RollingFile with appsettings.json

I'm trying to configure Serilog for a .NET Core project. Here's what I have in my appsettings.json: "Serilog": { "MinimumLevel": "…

c# serilog .net-core
Exception destructuring in Serilog

Serilog has a convenient way of destructuring objects as shown in this example: logger.Debug(exception, "This is an {Exception} …

c# .net exception logging serilog
Serilog's AddSerilog is not recognized

I'm trying to call loggerFactory.AddSerilog(); as per this documentation, but the AddSerilog method is not recognized: "Error CS1061 'ILoggerFactory' …

c# .net asp.net-core serilog
Using Asp.Net Core 2 Injection for Serilog with Multiple Projects

I have Serilog configured for Asp.Net Core 2.0 and it works great via .Net Core dependency injection in my startup …

c# asp.net logging asp.net-core-mvc serilog
How to use Serilog ForContext

I am new to Serilog and I am having a hard time figuring out how to use the context functionality. …

.net logging serilog
C# ASP.NET Core Serilog add class name and method to log

I recently added logging to my ASP.Net Core project. Currently the log writes to a .txt file in this …

c# asp.net logging asp.net-core serilog
Different Minimum Level Logs Serilog

Is there a way to differentiate what level is logged between the different loggers for Serilog? I want to be …

c# asp.net-core serilog asp.net-core-2.1
Solving error - Unable to resolve service for type 'Serilog.ILogger'

I am trying to implement SeriLog in ASP.NET core application (.NET framework) Below are steps I performed so far- 1) …

asp.net-core asp.net-core-mvc serilog
How to add my own properties to Serilog output template

I have a small application that is receiving messages from a service bus, which can send through several different types …

c# logging serilog