Skip to content

Commit 44ae815

Browse files
committed
Clean up
1 parent 66bdebb commit 44ae815

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Serilog.Sinks.RollingFile/RollingFileLoggerConfigurationExtensions.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,8 @@ public static LoggerConfiguration RollingFile(
111111
if (sinkConfiguration == null) throw new ArgumentNullException(nameof(sinkConfiguration));
112112
if (formatter == null) throw new ArgumentNullException(nameof(formatter));
113113

114-
if (shared)
115-
{
116-
if (buffered)
117-
throw new ArgumentException("Buffered writes are not available when file sharing is enabled.", nameof(buffered));
118-
}
114+
if (shared && buffered)
115+
throw new ArgumentException("Buffered writes are not available when file sharing is enabled.", nameof(buffered));
119116

120117
var sink = new RollingFileSink(pathFormat, formatter, fileSizeLimitBytes, retainedFileCountLimit, buffered: buffered, shared: shared);
121118
return sinkConfiguration.Sink(sink, restrictedToMinimumLevel, levelSwitch);

0 commit comments

Comments
 (0)