Skip to content

Commit 50d9dba

Browse files
authored
Merge pull request #62 from nblumhardt/overloads
Reinstate an overload used by AzureAppServicesIntegration
2 parents 40ae58e + 99fcd5b commit 50d9dba

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/Serilog.Extensions.Logging/SerilogLoggerFactoryExtensions.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System;
55
using Microsoft.Extensions.Logging;
66
using Serilog.Extensions.Logging;
7+
using System.ComponentModel;
78

89
namespace Serilog
910
{
@@ -12,6 +13,21 @@ namespace Serilog
1213
/// </summary>
1314
public static class SerilogLoggerFactoryExtensions
1415
{
16+
/// <summary>
17+
/// Add Serilog to the logging pipeline.
18+
/// </summary>
19+
/// <param name="factory">The logger factory to configure.</param>
20+
/// <param name="logger">The Serilog logger; if not supplied, the static <see cref="Serilog.Log"/> will be used.</param>
21+
/// <returns>The logger factory.</returns>
22+
[EditorBrowsable(EditorBrowsableState.Never)]
23+
public static ILoggerFactory AddSerilog(
24+
this ILoggerFactory factory,
25+
ILogger logger)
26+
{
27+
if (factory == null) throw new ArgumentNullException(nameof(factory));
28+
return factory.AddSerilog(logger, false);
29+
}
30+
1531
/// <summary>
1632
/// Add Serilog to the logging pipeline.
1733
/// </summary>

src/Serilog.Extensions.Logging/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.3.0-*",
2+
"version": "1.3.1-*",
33
"description": "Serilog provider for Microsoft.Extensions.Logging",
44
"authors": [ "Microsoft", "Serilog Contributors" ],
55
"packOptions": {

0 commit comments

Comments
 (0)