<PackageReference Include="Serilog.Sinks.File" Version="5.0.1-dev-00976" />

Serilog.FileLoggerConfigurationExtensions

public static class FileLoggerConfigurationExtensions
Extends LoggerConfiguration with methods to add file sinks.
namespace Serilog { public static class FileLoggerConfigurationExtensions { public static LoggerConfiguration File(this LoggerSinkConfiguration sinkConfiguration, string path, LogEventLevel restrictedToMinimumLevel, string outputTemplate, IFormatProvider formatProvider, long? fileSizeLimitBytes, LoggingLevelSwitch levelSwitch, bool buffered, bool shared, TimeSpan? flushToDiskInterval); public static LoggerConfiguration File(this LoggerSinkConfiguration sinkConfiguration, ITextFormatter formatter, string path, LogEventLevel restrictedToMinimumLevel, long? fileSizeLimitBytes, LoggingLevelSwitch levelSwitch, bool buffered, bool shared, TimeSpan? flushToDiskInterval); public static LoggerConfiguration File(this LoggerSinkConfiguration sinkConfiguration, string path, LogEventLevel restrictedToMinimumLevel, string outputTemplate, IFormatProvider formatProvider, long? fileSizeLimitBytes, LoggingLevelSwitch levelSwitch, bool buffered, bool shared, TimeSpan? flushToDiskInterval, RollingInterval rollingInterval, bool rollOnFileSizeLimit, int? retainedFileCountLimit, Encoding encoding); public static LoggerConfiguration File(this LoggerSinkConfiguration sinkConfiguration, ITextFormatter formatter, string path, LogEventLevel restrictedToMinimumLevel, long? fileSizeLimitBytes, LoggingLevelSwitch levelSwitch, bool buffered, bool shared, TimeSpan? flushToDiskInterval, RollingInterval rollingInterval, bool rollOnFileSizeLimit, int? retainedFileCountLimit, Encoding encoding); public static LoggerConfiguration File(this LoggerSinkConfiguration sinkConfiguration, string path, LogEventLevel restrictedToMinimumLevel = 0, string outputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", IFormatProvider formatProvider = null, long? fileSizeLimitBytes = 1073741824, LoggingLevelSwitch levelSwitch = null, bool buffered = false, bool shared = false, TimeSpan? flushToDiskInterval = default(TimeSpan?), RollingInterval rollingInterval = RollingInterval.Infinite, bool rollOnFileSizeLimit = false, int? retainedFileCountLimit = 31, Encoding encoding = null, FileLifecycleHooks hooks = null, TimeSpan? retainedFileTimeLimit = default(TimeSpan?)); public static LoggerConfiguration File(this LoggerSinkConfiguration sinkConfiguration, ITextFormatter formatter, string path, LogEventLevel restrictedToMinimumLevel = 0, long? fileSizeLimitBytes = 1073741824, LoggingLevelSwitch levelSwitch = null, bool buffered = false, bool shared = false, TimeSpan? flushToDiskInterval = default(TimeSpan?), RollingInterval rollingInterval = RollingInterval.Infinite, bool rollOnFileSizeLimit = false, int? retainedFileCountLimit = 31, Encoding encoding = null, FileLifecycleHooks hooks = null, TimeSpan? retainedFileTimeLimit = default(TimeSpan?)); public static LoggerConfiguration File(this LoggerAuditSinkConfiguration sinkConfiguration, string path, LogEventLevel restrictedToMinimumLevel, string outputTemplate, IFormatProvider formatProvider, LoggingLevelSwitch levelSwitch); public static LoggerConfiguration File(this LoggerAuditSinkConfiguration sinkConfiguration, ITextFormatter formatter, string path, LogEventLevel restrictedToMinimumLevel, LoggingLevelSwitch levelSwitch); public static LoggerConfiguration File(this LoggerAuditSinkConfiguration sinkConfiguration, string path, LogEventLevel restrictedToMinimumLevel = 0, string outputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", IFormatProvider formatProvider = null, LoggingLevelSwitch levelSwitch = null, Encoding encoding = null, FileLifecycleHooks hooks = null); public static LoggerConfiguration File(this LoggerAuditSinkConfiguration sinkConfiguration, ITextFormatter formatter, string path, LogEventLevel restrictedToMinimumLevel = 0, LoggingLevelSwitch levelSwitch = null, Encoding encoding = null, FileLifecycleHooks hooks = null); } }