Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 914 Bytes

README.md

File metadata and controls

18 lines (15 loc) · 914 Bytes

Serilog.Sinks.EmailPickup NuGet license

A sink that sends log events to the file system in an email format that can be picked up by, for example, IIS. Does the same thing as the log4net SmtpPickupDirAppender.

Package - Serilog.Sinks.EmailPickup | Platforms - .NET 4.5, .Net Standard 1.6

var log = new LoggerConfiguration()
    .WriteTo.EmailPickup(
        fromEmail: "[email protected]",
        toEmail: "[email protected]",
        pickupDirectory: @"c:\logs\emailpickup",
        subject: "UH OH",
        fileExtension: ".email",
        restrictedToMinimumLevel: LogEventLevel.Error)
    .CreateLogger();