Skip to content

Commit

Permalink
Merge pull request #62 from nblumhardt/overloads
Browse files Browse the repository at this point in the history
Reinstate an overload used by AzureAppServicesIntegration
  • Loading branch information
nblumhardt authored Nov 18, 2016
2 parents 40ae58e + 99fcd5b commit 50d9dba
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/Serilog.Extensions.Logging/SerilogLoggerFactoryExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using Microsoft.Extensions.Logging;
using Serilog.Extensions.Logging;
using System.ComponentModel;

namespace Serilog
{
Expand All @@ -12,6 +13,21 @@ namespace Serilog
/// </summary>
public static class SerilogLoggerFactoryExtensions
{
/// <summary>
/// Add Serilog to the logging pipeline.
/// </summary>
/// <param name="factory">The logger factory to configure.</param>
/// <param name="logger">The Serilog logger; if not supplied, the static <see cref="Serilog.Log"/> will be used.</param>
/// <returns>The logger factory.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static ILoggerFactory AddSerilog(
this ILoggerFactory factory,
ILogger logger)
{
if (factory == null) throw new ArgumentNullException(nameof(factory));
return factory.AddSerilog(logger, false);
}

/// <summary>
/// Add Serilog to the logging pipeline.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Serilog.Extensions.Logging/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.0-*",
"version": "1.3.1-*",
"description": "Serilog provider for Microsoft.Extensions.Logging",
"authors": [ "Microsoft", "Serilog Contributors" ],
"packOptions": {
Expand Down

0 comments on commit 50d9dba

Please sign in to comment.