How to extract every details from an exception and log it to Serilog

Just:

using Serilog;
using Serilog.Exceptions;

ILogger logger = new LoggerConfiguration()
    .Enrich.WithExceptionDetails()
    .WriteTo.Sink(new RollingFileSink(
        @"C:\logs",
        new JsonFormatter(renderMessage: true))
    .CreateLogger();

Source: RehanSaeed/Serilog.Exceptions: Log exception details and custom properties that are not output in Exception.ToString().