Skip to content

Commit 5516198

Browse files
author
Sergey Komisarchik
committed
make ILoggingBuilder.AddSerilog fluent friendly
1 parent 5be654b commit 5516198

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Serilog.Extensions.Logging/SerilogLoggingBuilderExtensions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Microsoft.Extensions.Logging;
33
using Serilog.Extensions.Logging;
44

5-
65
namespace Serilog
76
{
87
/// <summary>
@@ -19,11 +18,13 @@ public static class SerilogLoggingBuilderExtensions
1918
/// logger is not specified but <paramref name="dispose"/> is true, the <see cref="Log.CloseAndFlush()"/> method will be
2019
/// called on the static <see cref="Log"/> class instead.</param>
2120
/// <returns>The logger factory.</returns>
22-
public static void AddSerilog(this ILoggingBuilder builder, ILogger logger = null, bool dispose = false)
21+
public static ILoggingBuilder AddSerilog(this ILoggingBuilder builder, ILogger logger = null, bool dispose = false)
2322
{
2423
if (builder == null) throw new ArgumentNullException(nameof(builder));
2524

2625
builder.AddProvider(new SerilogLoggerProvider(logger, dispose));
26+
27+
return builder;
2728
}
2829
}
2930
}

0 commit comments

Comments
 (0)