diff --git a/src/Serilog.Sinks.File/FileLoggerConfigurationExtensions.cs b/src/Serilog.Sinks.File/FileLoggerConfigurationExtensions.cs index 74383b2..d3e7d8f 100644 --- a/src/Serilog.Sinks.File/FileLoggerConfigurationExtensions.cs +++ b/src/Serilog.Sinks.File/FileLoggerConfigurationExtensions.cs @@ -14,6 +14,7 @@ using System; using System.ComponentModel; +using System.IO; using System.Text; using Serilog.Configuration; using Serilog.Core; @@ -238,6 +239,15 @@ public static LoggerConfiguration File( /// Ignored if is . /// The default is to retain files indefinitely. /// Configuration object allowing method chaining. + /// When is null + /// When is null + /// When is null + /// + /// + /// + /// When is too long + /// The caller does not have the required permission to access the + /// Invalid public static LoggerConfiguration File( this LoggerSinkConfiguration sinkConfiguration, string path, @@ -299,6 +309,15 @@ public static LoggerConfiguration File( /// Ignored if is . /// The default is to retain files indefinitely. /// Configuration object allowing method chaining. + /// When is null + /// When is null + /// When is null + /// + /// + /// + /// When is too long + /// The caller does not have the required permission to access the + /// Invalid public static LoggerConfiguration File( this LoggerSinkConfiguration sinkConfiguration, ITextFormatter formatter, @@ -339,6 +358,14 @@ public static LoggerConfiguration File( /// the default is "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}". /// Configuration object allowing method chaining. /// The file will be written using the UTF-8 character set. + /// When is null + /// When is null + /// + /// + /// + /// When is too long + /// The caller does not have the required permission to access the + /// Invalid [Obsolete("New code should not be compiled against this obsolete overload"), EditorBrowsable(EditorBrowsableState.Never)] public static LoggerConfiguration File( this LoggerAuditSinkConfiguration sinkConfiguration, @@ -367,6 +394,15 @@ public static LoggerConfiguration File( /// to be changed at runtime. /// Configuration object allowing method chaining. /// The file will be written using the UTF-8 character set. + /// When is null + /// When is null + /// When is null + /// + /// + /// + /// When is too long + /// The caller does not have the required permission to access the + /// Invalid [Obsolete("New code should not be compiled against this obsolete overload"), EditorBrowsable(EditorBrowsableState.Never)] public static LoggerConfiguration File( this LoggerAuditSinkConfiguration sinkConfiguration, @@ -393,6 +429,15 @@ public static LoggerConfiguration File( /// Character encoding used to write the text file. The default is UTF-8 without BOM. /// Optionally enables hooking into log file lifecycle events. /// Configuration object allowing method chaining. + /// When is null + /// When is null + /// When is null + /// + /// + /// + /// When is too long + /// The caller does not have the required permission to access the + /// Invalid public static LoggerConfiguration File( this LoggerAuditSinkConfiguration sinkConfiguration, string path, @@ -428,6 +473,15 @@ public static LoggerConfiguration File( /// Character encoding used to write the text file. The default is UTF-8 without BOM. /// Optionally enables hooking into log file lifecycle events. /// Configuration object allowing method chaining. + /// When is null + /// When is null + /// When is null + /// + /// + /// + /// When is too long + /// The caller does not have the required permission to access the + /// Invalid public static LoggerConfiguration File( this LoggerAuditSinkConfiguration sinkConfiguration, ITextFormatter formatter, diff --git a/src/Serilog.Sinks.File/Sinks/File/FileSink.cs b/src/Serilog.Sinks.File/Sinks/File/FileSink.cs index 451ba55..bc89ed9 100644 --- a/src/Serilog.Sinks.File/Sinks/File/FileSink.cs +++ b/src/Serilog.Sinks.File/Sinks/File/FileSink.cs @@ -44,7 +44,15 @@ public sealed class FileSink : IFileSink, IDisposable /// is false. /// Configuration object allowing method chaining. /// This constructor preserves compatibility with early versions of the public API. New code should not depend on this type. + /// When is null + /// When is null or less than 0 + /// When is null /// + /// + /// + /// When is too long + /// The caller does not have the required permission to access the + /// Invalid [Obsolete("This type and constructor will be removed from the public API in a future version; use `WriteTo.File()` instead.")] public FileSink(string path, ITextFormatter textFormatter, long? fileSizeLimitBytes, Encoding encoding = null, bool buffered = false) : this(path, textFormatter, fileSizeLimitBytes, encoding, buffered, null) @@ -113,6 +121,7 @@ bool IFileSink.EmitOrOverflow(LogEvent logEvent) /// Emit the provided log event to the sink. /// /// The log event to write. + /// When is null public void Emit(LogEvent logEvent) { ((IFileSink) this).EmitOrOverflow(logEvent); diff --git a/src/Serilog.Sinks.File/Sinks/File/PeriodicFlushToDiskSink.cs b/src/Serilog.Sinks.File/Sinks/File/PeriodicFlushToDiskSink.cs index 66b0868..1b931c9 100644 --- a/src/Serilog.Sinks.File/Sinks/File/PeriodicFlushToDiskSink.cs +++ b/src/Serilog.Sinks.File/Sinks/File/PeriodicFlushToDiskSink.cs @@ -36,7 +36,7 @@ public class PeriodicFlushToDiskSink : ILogEventSink, IDisposable /// /// The sink to wrap. /// The interval at which to flush the underlying sink. - /// + /// When is null public PeriodicFlushToDiskSink(ILogEventSink sink, TimeSpan flushInterval) { _sink = sink ?? throw new ArgumentNullException(nameof(sink)); diff --git a/src/Serilog.Sinks.File/Sinks/File/SharedFileSink.AtomicAppend.cs b/src/Serilog.Sinks.File/Sinks/File/SharedFileSink.AtomicAppend.cs index 25e8867..723058e 100644 --- a/src/Serilog.Sinks.File/Sinks/File/SharedFileSink.AtomicAppend.cs +++ b/src/Serilog.Sinks.File/Sinks/File/SharedFileSink.AtomicAppend.cs @@ -50,7 +50,14 @@ public sealed class SharedFileSink : IFileSink, IDisposable /// will be written in full even if it exceeds the limit. /// Character encoding used to write the text file. The default is UTF-8 without BOM. /// Configuration object allowing method chaining. + /// When is null + /// When is null /// + /// + /// + /// When is too long + /// The caller does not have the required permission to access the + /// Invalid public SharedFileSink(string path, ITextFormatter textFormatter, long? fileSizeLimitBytes, Encoding encoding = null) { if (fileSizeLimitBytes.HasValue && fileSizeLimitBytes < 1) @@ -141,6 +148,7 @@ bool IFileSink.EmitOrOverflow(LogEvent logEvent) /// Emit the provided log event to the sink. /// /// The log event to write. + /// When is null public void Emit(LogEvent logEvent) { ((IFileSink)this).EmitOrOverflow(logEvent); diff --git a/src/Serilog.Sinks.File/Sinks/File/SharedFileSink.OSMutex.cs b/src/Serilog.Sinks.File/Sinks/File/SharedFileSink.OSMutex.cs index 38b2326..2aad6a2 100644 --- a/src/Serilog.Sinks.File/Sinks/File/SharedFileSink.OSMutex.cs +++ b/src/Serilog.Sinks.File/Sinks/File/SharedFileSink.OSMutex.cs @@ -49,7 +49,14 @@ public sealed class SharedFileSink : IFileSink, IDisposable /// Character encoding used to write the text file. The default is UTF-8 without BOM. /// Configuration object allowing method chaining. /// The file will be written using the UTF-8 character set. + /// When is null + /// When is null /// + /// + /// + /// When is too long + /// The caller does not have the required permission to access the + /// Invalid public SharedFileSink(string path, ITextFormatter textFormatter, long? fileSizeLimitBytes, Encoding encoding = null) { if (path == null) throw new ArgumentNullException(nameof(path)); @@ -104,6 +111,7 @@ bool IFileSink.EmitOrOverflow(LogEvent logEvent) /// Emit the provided log event to the sink. /// /// The log event to write. + /// When is null public void Emit(LogEvent logEvent) { ((IFileSink)this).EmitOrOverflow(logEvent);