Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 2.0.1 binary breaking change on ReadFrom.AppSettings() #11

Merged
merged 1 commit into from
Sep 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
// limitations under the License.

using System;
using System.ComponentModel;
using Serilog.Configuration;
using Serilog.Settings.AppSettings;

@@ -23,6 +24,26 @@ namespace Serilog
/// </summary>
public static class AppSettingsLoggerConfigurationExtensions
{
/// <summary>
/// Reads the &lt;appSettings&gt; element of App.config or Web.config, searching for for keys
/// that look like: <code>serilog:*</code>, which are used to configure
/// the logger. To add a sink, use a key like <code>serilog:write-to:File.path</code> for
/// each parameter to the sink's configuration method. To add an additional assembly
/// containing sinks, use <code>serilog:using</code>. To set the level use
/// <code>serilog:minimum-level</code>.
/// </summary>
/// <param name="settingConfiguration">Logger setting configuration.</param>
/// <param name="settingPrefix">Prefix to use when reading keys in appSettings. If specified the value
/// will be prepended to the setting keys and followed by :, for example "myapp" will use "myapp:serilog:minumum-level. If null
/// no prefix is applied.</param>
/// <returns>An object allowing configuration to continue.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static LoggerConfiguration AppSettings(
this LoggerSettingsConfiguration settingConfiguration, string settingPrefix = null)
{
return AppSettings(settingConfiguration, settingPrefix, filePath: null);
}

/// <summary>
/// Reads the &lt;appSettings&gt; element of App.config or Web.config, searching for for keys
/// that look like: <code>serilog:*</code>, which are used to configure