nuget reorganization
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"version": 2,
|
||||
"contentHash": "db0OcbWeSCvYQkHWu6n0v40N4kKaTAXNjlM3BKvcbwvNzYphQFcBR+36eQ/7hMMwOkJvAyLC2a9/jNdUL5NjtQ==",
|
||||
"source": "https://api.nuget.org/v3/index.json"
|
||||
}
|
||||
Binary file not shown.
@@ -1,94 +0,0 @@
|
||||
# Serilog.Extensions.Hosting [](https://ci.appveyor.com/project/serilog/serilog-extensions-hosting) [](https://www.nuget.org/packages/Serilog.Extensions.Hosting/)
|
||||
|
||||
Serilog logging for _Microsoft.Extensions.Hosting_. This package routes framework log messages through Serilog, so you can get information about the framework's internal operations written to the same Serilog sinks as your application events.
|
||||
|
||||
**ASP.NET Core** applications should consider [using _Serilog.AspNetCore_ instead](https://github.com/serilog/serilog-aspnetcore), which bundles this package and includes other ASP.NET Core-specific features.
|
||||
|
||||
### Instructions
|
||||
|
||||
**First**, install the _Serilog.Extensions.Hosting_ [NuGet package](https://www.nuget.org/packages/Serilog.Extensions.Hosting) into your app. You will need a way to view the log messages - _Serilog.Sinks.Console_ writes these to the console; there are [many more sinks available](https://www.nuget.org/packages?q=Tags%3A%22serilog%22) on NuGet.
|
||||
|
||||
```powershell
|
||||
dotnet add package Serilog.Extensions.Hosting
|
||||
dotnet add package Serilog.Sinks.Console
|
||||
```
|
||||
|
||||
**Next**, in your application's _Program.cs_ file, configure Serilog first. A `try`/`catch` block will ensure any configuration issues are appropriately logged:
|
||||
|
||||
```csharp
|
||||
public class Program
|
||||
{
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.MinimumLevel.Debug()
|
||||
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
|
||||
.Enrich.FromLogContext()
|
||||
.WriteTo.Console()
|
||||
.CreateLogger();
|
||||
|
||||
try
|
||||
{
|
||||
Log.Information("Starting host");
|
||||
BuildHost(args).Run();
|
||||
return 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Fatal(ex, "Host terminated unexpectedly");
|
||||
return 1;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Log.CloseAndFlush();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Then**, add `UseSerilog()` to the host builder in `BuildHost()`.
|
||||
|
||||
```csharp
|
||||
public static IHost BuildHost(string[] args) =>
|
||||
new HostBuilder()
|
||||
.ConfigureServices(services => services.AddSingleton<IHostedService, PrintTimeService>())
|
||||
.UseSerilog() // <- Add this line
|
||||
.Build();
|
||||
}
|
||||
```
|
||||
|
||||
**Finally**, clean up by removing the remaining `"Logging"` section from _appsettings.json_ files (this can be replaced with [Serilog configuration](https://github.com/serilog/serilog-settings-configuration) as shown in [this example](https://github.com/serilog/serilog-extensions-hosting/blob/dev/samples/SimpleServiceSample/Program.cs), if required)
|
||||
|
||||
That's it! You will see log output like:
|
||||
|
||||
```
|
||||
[22:10:39 INF] Getting the motors running...
|
||||
[22:10:39 INF] The current time is: 12/05/2018 10:10:39 +00:00
|
||||
```
|
||||
|
||||
A more complete example, showing _appsettings.json_ configuration, can be found in [the sample project here](https://github.com/serilog/serilog-extensions-hosting/tree/dev/samples/SimpleServiceSample).
|
||||
|
||||
### Using the package
|
||||
|
||||
With _Serilog.Extensions.Hosting_ installed and configured, you can write log messages directly through Serilog or any `ILogger` interface injected by .NET. All loggers will use the same underlying implementation, levels, and destinations.
|
||||
|
||||
**Tip:** change the minimum level for `Microsoft` to `Warning`
|
||||
|
||||
### Inline initialization
|
||||
|
||||
You can alternatively configure Serilog using a delegate as shown below:
|
||||
|
||||
```csharp
|
||||
// dotnet add package Serilog.Settings.Configuration
|
||||
.UseSerilog((hostingContext, services, loggerConfiguration) => loggerConfiguration
|
||||
.ReadFrom.Configuration(hostingContext.Configuration)
|
||||
.Enrich.FromLogContext()
|
||||
.WriteTo.Console())
|
||||
```
|
||||
|
||||
This has the advantage of making the `hostingContext`'s `Configuration` object available for configuration of the logger, but at the expense of ignoring `Exception`s raised earlier in program startup.
|
||||
|
||||
If this method is used, `Log.Logger` is assigned implicitly, and closed when the app is shut down.
|
||||
|
||||
### Versioning
|
||||
|
||||
This package tracks the versioning and target framework support of its [_Microsoft.Extensions.Hosting_](https://nuget.org/packages/Microsoft.Extensions.Hosting) dependency.
|
||||
@@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Serilog.Extensions.Hosting</id>
|
||||
<version>8.0.0</version>
|
||||
<authors>Microsoft,Serilog Contributors</authors>
|
||||
<license type="expression">Apache-2.0</license>
|
||||
<licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>
|
||||
<icon>icon.png</icon>
|
||||
<readme>README.md</readme>
|
||||
<projectUrl>https://github.com/serilog/serilog-extensions-hosting</projectUrl>
|
||||
<description>Serilog support for .NET Core logging in hosted services</description>
|
||||
<tags>serilog aspnet aspnetcore hosting</tags>
|
||||
<repository type="git" url="https://github.com/serilog/serilog-extensions-hosting" commit="11a23e34f1c7aaafa5703dd7639ba6dc1171c7f6" />
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.6.2">
|
||||
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.Extensions.Hosting.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Serilog" version="3.1.1" exclude="Build,Analyzers" />
|
||||
<dependency id="Serilog.Extensions.Logging" version="8.0.0" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
<group targetFramework="net6.0">
|
||||
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.Extensions.Hosting.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Serilog" version="3.1.1" exclude="Build,Analyzers" />
|
||||
<dependency id="Serilog.Extensions.Logging" version="8.0.0" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
<group targetFramework="net7.0">
|
||||
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.Extensions.Hosting.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Serilog" version="3.1.1" exclude="Build,Analyzers" />
|
||||
<dependency id="Serilog.Extensions.Logging" version="8.0.0" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
<group targetFramework="net8.0">
|
||||
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.Extensions.Hosting.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Serilog" version="3.1.1" exclude="Build,Analyzers" />
|
||||
<dependency id="Serilog.Extensions.Logging" version="8.0.0" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
<group targetFramework=".NETStandard2.0">
|
||||
<dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.Extensions.Hosting.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="8.0.0" exclude="Build,Analyzers" />
|
||||
<dependency id="Serilog" version="3.1.1" exclude="Build,Analyzers" />
|
||||
<dependency id="Serilog.Extensions.Logging" version="8.0.0" exclude="Build,Analyzers" />
|
||||
</group>
|
||||
</dependencies>
|
||||
</metadata>
|
||||
</package>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
@@ -1,261 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Serilog.Extensions.Hosting</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Serilog.Extensions.Hosting.DiagnosticContext">
|
||||
<summary>
|
||||
Implements an ambient diagnostic context using <see cref="T:System.Threading.AsyncLocal`1"/>.
|
||||
</summary>
|
||||
<remarks>Consumers should use <see cref="T:Serilog.IDiagnosticContext"/> to set context properties.</remarks>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.#ctor(Serilog.ILogger)">
|
||||
<summary>
|
||||
Construct a <see cref="T:Serilog.Extensions.Hosting.DiagnosticContext"/>.
|
||||
</summary>
|
||||
<param name="logger">A logger for binding properties in the context, or <c>null</c> to use <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.BeginCollection">
|
||||
<summary>
|
||||
Start collecting properties to associate with the current diagnostic context. This will replace
|
||||
the active collector, if any.
|
||||
</summary>
|
||||
<returns>A collector that will receive properties added in the current diagnostic context.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.Set(System.String,System.Object,System.Boolean)">
|
||||
<inheritdoc cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.SetException(System.Exception)">
|
||||
<inheritdoc cref="M:Serilog.IDiagnosticContext.SetException(System.Exception)"/>
|
||||
</member>
|
||||
<member name="T:Serilog.Extensions.Hosting.DiagnosticContextCollector">
|
||||
<summary>
|
||||
A container that receives properties added to a diagnostic context.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.#ctor(System.IDisposable)">
|
||||
<summary>
|
||||
Construct a <see cref="T:Serilog.Extensions.Hosting.DiagnosticContextCollector"/>.
|
||||
</summary>
|
||||
<param name="chainedDisposable">An object that will be disposed to signal completion/disposal of
|
||||
the collector.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.AddOrUpdate(Serilog.Events.LogEventProperty)">
|
||||
<summary>
|
||||
Add the property to the context.
|
||||
</summary>
|
||||
<param name="property">The property to add.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.SetException(System.Exception)">
|
||||
<summary>
|
||||
Set the exception associated with the current diagnostic context.
|
||||
</summary>
|
||||
<example>
|
||||
Passing an exception to the diagnostic context is useful when unhandled exceptions are handled before reaching Serilog's
|
||||
RequestLoggingMiddleware. One example is using https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails to transform
|
||||
exceptions to ProblemDetails responses.
|
||||
</example>
|
||||
<remarks>
|
||||
If an unhandled exception reaches Serilog's RequestLoggingMiddleware, then the unhandled exception takes precedence.<br/>
|
||||
If <c>null</c> is given, it clears any previously assigned exception.
|
||||
</remarks>
|
||||
<param name="exception">The exception to log.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.TryComplete(System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@)">
|
||||
<summary>
|
||||
Complete the context and retrieve the properties added to it, if any. This will
|
||||
stop collection and remove the collector from the original execution context and
|
||||
any of its children.
|
||||
</summary>
|
||||
<param name="properties">The collected properties, or null if no collection is active.</param>
|
||||
<returns>True if properties could be collected.</returns>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.TryComplete(System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@,System.Exception@)">
|
||||
<summary>
|
||||
Complete the context and retrieve the properties and exception added to it, if any. This will
|
||||
stop collection and remove the collector from the original execution context and
|
||||
any of its children.
|
||||
</summary>
|
||||
<param name="properties">The collected properties, or null if no collection is active.</param>
|
||||
<param name="exception">The collected exception, or null if none has been collected or if no collection is active.</param>
|
||||
<returns>True if properties could be collected.</returns>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.SetException(System.Exception)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.Dispose">
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Serilog.Hosting.SerilogLoggerFactory">
|
||||
<summary>
|
||||
Implements <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory"/> so that we can inject Serilog Logger.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.#ctor(Serilog.ILogger,System.Boolean)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Serilog.Hosting.SerilogLoggerFactory"/> class.
|
||||
</summary>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.Dispose">
|
||||
<summary>
|
||||
Disposes the provider.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.CreateLogger(System.String)">
|
||||
<summary>
|
||||
Creates a new <see cref="T:Microsoft.Extensions.Logging.ILogger" /> instance.
|
||||
</summary>
|
||||
<param name="categoryName">The category name for messages produced by the logger.</param>
|
||||
<returns>
|
||||
The <see cref="T:Microsoft.Extensions.Logging.ILogger" />.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.AddProvider(Microsoft.Extensions.Logging.ILoggerProvider)">
|
||||
<summary>
|
||||
Adds an <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider" /> to the logging system.
|
||||
</summary>
|
||||
<param name="provider">The <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider" />.</param>
|
||||
</member>
|
||||
<member name="T:Serilog.IDiagnosticContext">
|
||||
<summary>
|
||||
Collects diagnostic information for packaging into wide events.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)">
|
||||
<summary>
|
||||
Set the specified property on the current diagnostic context. The property will be collected
|
||||
and attached to the event emitted at the completion of the context.
|
||||
</summary>
|
||||
<param name="propertyName">The name of the property. Must be non-empty.</param>
|
||||
<param name="value">The property value.</param>
|
||||
<param name="destructureObjects">If true, the value will be serialized as structured
|
||||
data if possible; if false, the object will be recorded as a scalar or simple array.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.IDiagnosticContext.SetException(System.Exception)">
|
||||
<summary>
|
||||
Set the specified exception on the current diagnostic context.
|
||||
</summary>
|
||||
<remarks>
|
||||
This method is useful when unhandled exceptions do not reach <c>Serilog.AspNetCore.RequestLoggingMiddleware</c>,
|
||||
such as when using <a href="https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails">Hellang.Middleware.ProblemDetails</a>
|
||||
to transform exceptions to ProblemDetails responses.
|
||||
</remarks>
|
||||
<param name="exception">The exception to log. If <c>null</c> is given, it clears any previously assigned exception.</param>
|
||||
</member>
|
||||
<member name="T:Serilog.LoggerSettingsConfigurationExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Serilog.Configuration.LoggerSettingsConfiguration"/> with methods for consuming host services.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.LoggerSettingsConfigurationExtensions.Services(Serilog.Configuration.LoggerSettingsConfiguration,System.IServiceProvider)">
|
||||
<summary>
|
||||
Configure the logger using components from the <paramref name="services"/>. If present, the logger will
|
||||
receive implementations/instances of <see cref="T:Serilog.Core.LoggingLevelSwitch"/>, <see cref="T:Serilog.Core.IDestructuringPolicy"/>,
|
||||
<see cref="T:Serilog.Core.ILogEventFilter"/>, <see cref="T:Serilog.Core.ILogEventEnricher"/>, <see cref="T:Serilog.Core.ILogEventSink"/>, and
|
||||
<see cref="T:Serilog.Configuration.ILoggerSettings"/>.
|
||||
</summary>
|
||||
<param name="loggerSettingsConfiguration">The `ReadFrom` configuration object.</param>
|
||||
<param name="services">A <see cref="T:System.IServiceProvider"/> from which services will be requested.</param>
|
||||
<returns>A <see cref="T:Serilog.LoggerConfiguration"/> to support method chaining.</returns>
|
||||
</member>
|
||||
<member name="T:Serilog.SerilogHostBuilderExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Microsoft.Extensions.Hosting.IHostBuilder"/> with Serilog configuration methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,Serilog.ILogger,System.Boolean,Serilog.Extensions.Logging.LoggerProviderCollection)">
|
||||
<summary>
|
||||
Sets Serilog as the logging provider.
|
||||
</summary>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
<param name="providers">A <see cref="T:Serilog.Extensions.Logging.LoggerProviderCollection"/> registered in the Serilog pipeline using the
|
||||
<c>WriteTo.Providers()</c> configuration method, enabling other <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s to receive events. By
|
||||
default, only Serilog sinks will receive events.</param>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<remarks>
|
||||
A <see cref="T:Microsoft.Extensions.Hosting.HostBuilderContext"/> is supplied so that configuration and hosting information can be used.
|
||||
The logger will be shut down when application services are disposed.
|
||||
</remarks>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<remarks>
|
||||
A <see cref="T:Microsoft.Extensions.Hosting.HostBuilderContext"/> is supplied so that configuration and hosting information can be used.
|
||||
The logger will be shut down when application services are disposed.
|
||||
</remarks>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<remarks>If the static <see cref="P:Serilog.Log.Logger"/> is a bootstrap logger (see
|
||||
<c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
|
||||
not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
|
||||
replaced entirely or ignored.</remarks>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="T:Serilog.SerilogServiceCollectionExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> with Serilog configuration methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,Serilog.ILogger,System.Boolean,Serilog.Extensions.Logging.LoggerProviderCollection)">
|
||||
<summary>
|
||||
Sets Serilog as the logging provider.
|
||||
</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
<param name="providers">A <see cref="T:Serilog.Extensions.Logging.LoggerProviderCollection"/> registered in the Serilog pipeline using the
|
||||
<c>WriteTo.Providers()</c> configuration method, enabling other <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s to receive events. By
|
||||
default, only Serilog sinks will receive events.</param>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<remarks>If the static <see cref="P:Serilog.Log.Logger"/> is a bootstrap logger (see
|
||||
<c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
|
||||
not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
|
||||
replaced entirely or ignored.</remarks>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -1,359 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Serilog.Extensions.Hosting</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Serilog.Extensions.Hosting.DiagnosticContext">
|
||||
<summary>
|
||||
Implements an ambient diagnostic context using <see cref="T:System.Threading.AsyncLocal`1"/>.
|
||||
</summary>
|
||||
<remarks>Consumers should use <see cref="T:Serilog.IDiagnosticContext"/> to set context properties.</remarks>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.#ctor(Serilog.ILogger)">
|
||||
<summary>
|
||||
Construct a <see cref="T:Serilog.Extensions.Hosting.DiagnosticContext"/>.
|
||||
</summary>
|
||||
<param name="logger">A logger for binding properties in the context, or <c>null</c> to use <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.BeginCollection">
|
||||
<summary>
|
||||
Start collecting properties to associate with the current diagnostic context. This will replace
|
||||
the active collector, if any.
|
||||
</summary>
|
||||
<returns>A collector that will receive properties added in the current diagnostic context.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.Set(System.String,System.Object,System.Boolean)">
|
||||
<inheritdoc cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.SetException(System.Exception)">
|
||||
<inheritdoc cref="M:Serilog.IDiagnosticContext.SetException(System.Exception)"/>
|
||||
</member>
|
||||
<member name="T:Serilog.Extensions.Hosting.DiagnosticContextCollector">
|
||||
<summary>
|
||||
A container that receives properties added to a diagnostic context.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.#ctor(System.IDisposable)">
|
||||
<summary>
|
||||
Construct a <see cref="T:Serilog.Extensions.Hosting.DiagnosticContextCollector"/>.
|
||||
</summary>
|
||||
<param name="chainedDisposable">An object that will be disposed to signal completion/disposal of
|
||||
the collector.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.AddOrUpdate(Serilog.Events.LogEventProperty)">
|
||||
<summary>
|
||||
Add the property to the context.
|
||||
</summary>
|
||||
<param name="property">The property to add.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.SetException(System.Exception)">
|
||||
<summary>
|
||||
Set the exception associated with the current diagnostic context.
|
||||
</summary>
|
||||
<example>
|
||||
Passing an exception to the diagnostic context is useful when unhandled exceptions are handled before reaching Serilog's
|
||||
RequestLoggingMiddleware. One example is using https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails to transform
|
||||
exceptions to ProblemDetails responses.
|
||||
</example>
|
||||
<remarks>
|
||||
If an unhandled exception reaches Serilog's RequestLoggingMiddleware, then the unhandled exception takes precedence.<br/>
|
||||
If <c>null</c> is given, it clears any previously assigned exception.
|
||||
</remarks>
|
||||
<param name="exception">The exception to log.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.TryComplete(System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@)">
|
||||
<summary>
|
||||
Complete the context and retrieve the properties added to it, if any. This will
|
||||
stop collection and remove the collector from the original execution context and
|
||||
any of its children.
|
||||
</summary>
|
||||
<param name="properties">The collected properties, or null if no collection is active.</param>
|
||||
<returns>True if properties could be collected.</returns>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.TryComplete(System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@,System.Exception@)">
|
||||
<summary>
|
||||
Complete the context and retrieve the properties and exception added to it, if any. This will
|
||||
stop collection and remove the collector from the original execution context and
|
||||
any of its children.
|
||||
</summary>
|
||||
<param name="properties">The collected properties, or null if no collection is active.</param>
|
||||
<param name="exception">The collected exception, or null if none has been collected or if no collection is active.</param>
|
||||
<returns>True if properties could be collected.</returns>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.SetException(System.Exception)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.Dispose">
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Serilog.Extensions.Hosting.ReloadableLogger">
|
||||
<summary>
|
||||
A Serilog <see cref="T:Serilog.ILogger"/> that can be reconfigured without invalidating existing <see cref="T:Serilog.ILogger"/>
|
||||
instances derived from it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Reload(System.Func{Serilog.LoggerConfiguration,Serilog.LoggerConfiguration})">
|
||||
<summary>
|
||||
Reload the logger using the supplied configuration delegate.
|
||||
</summary>
|
||||
<param name="configure">A callback in which the logger is reconfigured.</param>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="configure"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Freeze">
|
||||
<summary>
|
||||
Freeze the logger, so that no further reconfiguration is possible. Once the logger is frozen, logging through
|
||||
new contextual loggers will have no additional cost, and logging directly through this logger will not require
|
||||
any synchronization.
|
||||
</summary>
|
||||
<returns>The <see cref="T:Serilog.Core.Logger"/> configured with the final settings.</returns>
|
||||
<exception cref="T:System.InvalidOperationException">The logger is already frozen.</exception>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Dispose">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(Serilog.Core.ILogEventEnricher)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(System.Collections.Generic.IEnumerable{Serilog.Core.ILogEventEnricher})">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(System.String,System.Object,System.Boolean)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext``1">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(System.Type)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEvent)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.String)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``1(Serilog.Events.LogEventLevel,System.String,``0)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``2(Serilog.Events.LogEventLevel,System.String,``0,``1)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``3(Serilog.Events.LogEventLevel,System.String,``0,``1,``2)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.String,System.Object[])">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.Exception,System.String)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``1(Serilog.Events.LogEventLevel,System.Exception,System.String,``0)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``2(Serilog.Events.LogEventLevel,System.Exception,System.String,``0,``1)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``3(Serilog.Events.LogEventLevel,System.Exception,System.String,``0,``1,``2)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.Exception,System.String,System.Object[])">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.IsEnabled(Serilog.Events.LogEventLevel)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.BindMessageTemplate(System.String,System.Object[],Serilog.Events.MessageTemplate@,System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.BindProperty(System.String,System.Object,System.Boolean,Serilog.Events.LogEventProperty@)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Serilog.Hosting.SerilogLoggerFactory">
|
||||
<summary>
|
||||
Implements <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory"/> so that we can inject Serilog Logger.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.#ctor(Serilog.ILogger,System.Boolean)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Serilog.Hosting.SerilogLoggerFactory"/> class.
|
||||
</summary>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.Dispose">
|
||||
<summary>
|
||||
Disposes the provider.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.CreateLogger(System.String)">
|
||||
<summary>
|
||||
Creates a new <see cref="T:Microsoft.Extensions.Logging.ILogger" /> instance.
|
||||
</summary>
|
||||
<param name="categoryName">The category name for messages produced by the logger.</param>
|
||||
<returns>
|
||||
The <see cref="T:Microsoft.Extensions.Logging.ILogger" />.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.AddProvider(Microsoft.Extensions.Logging.ILoggerProvider)">
|
||||
<summary>
|
||||
Adds an <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider" /> to the logging system.
|
||||
</summary>
|
||||
<param name="provider">The <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider" />.</param>
|
||||
</member>
|
||||
<member name="T:Serilog.IDiagnosticContext">
|
||||
<summary>
|
||||
Collects diagnostic information for packaging into wide events.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)">
|
||||
<summary>
|
||||
Set the specified property on the current diagnostic context. The property will be collected
|
||||
and attached to the event emitted at the completion of the context.
|
||||
</summary>
|
||||
<param name="propertyName">The name of the property. Must be non-empty.</param>
|
||||
<param name="value">The property value.</param>
|
||||
<param name="destructureObjects">If true, the value will be serialized as structured
|
||||
data if possible; if false, the object will be recorded as a scalar or simple array.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.IDiagnosticContext.SetException(System.Exception)">
|
||||
<summary>
|
||||
Set the specified exception on the current diagnostic context.
|
||||
</summary>
|
||||
<remarks>
|
||||
This method is useful when unhandled exceptions do not reach <c>Serilog.AspNetCore.RequestLoggingMiddleware</c>,
|
||||
such as when using <a href="https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails">Hellang.Middleware.ProblemDetails</a>
|
||||
to transform exceptions to ProblemDetails responses.
|
||||
</remarks>
|
||||
<param name="exception">The exception to log. If <c>null</c> is given, it clears any previously assigned exception.</param>
|
||||
</member>
|
||||
<member name="T:Serilog.LoggerConfigurationExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Serilog.LoggerConfiguration"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.LoggerConfigurationExtensions.CreateBootstrapLogger(Serilog.LoggerConfiguration)">
|
||||
<summary>
|
||||
Create a <see cref="T:Serilog.Extensions.Hosting.ReloadableLogger"/> for use during host bootstrapping. The
|
||||
<see cref="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)"/>
|
||||
configuration overload will detect when <see cref="P:Serilog.Log.Logger"/> is set to a <see cref="T:Serilog.Extensions.Hosting.ReloadableLogger"/> instance, and
|
||||
reconfigure/freeze it so that <see cref="T:Serilog.ILogger"/>s created during host bootstrapping continue to work once
|
||||
logger configuration (with access to host services) is completed.
|
||||
</summary>
|
||||
<param name="loggerConfiguration"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Serilog.LoggerSettingsConfigurationExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Serilog.Configuration.LoggerSettingsConfiguration"/> with methods for consuming host services.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.LoggerSettingsConfigurationExtensions.Services(Serilog.Configuration.LoggerSettingsConfiguration,System.IServiceProvider)">
|
||||
<summary>
|
||||
Configure the logger using components from the <paramref name="services"/>. If present, the logger will
|
||||
receive implementations/instances of <see cref="T:Serilog.Core.LoggingLevelSwitch"/>, <see cref="T:Serilog.Core.IDestructuringPolicy"/>,
|
||||
<see cref="T:Serilog.Core.ILogEventFilter"/>, <see cref="T:Serilog.Core.ILogEventEnricher"/>, <see cref="T:Serilog.Core.ILogEventSink"/>, and
|
||||
<see cref="T:Serilog.Configuration.ILoggerSettings"/>.
|
||||
</summary>
|
||||
<param name="loggerSettingsConfiguration">The `ReadFrom` configuration object.</param>
|
||||
<param name="services">A <see cref="T:System.IServiceProvider"/> from which services will be requested.</param>
|
||||
<returns>A <see cref="T:Serilog.LoggerConfiguration"/> to support method chaining.</returns>
|
||||
</member>
|
||||
<member name="T:Serilog.SerilogHostBuilderExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Microsoft.Extensions.Hosting.IHostBuilder"/> with Serilog configuration methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,Serilog.ILogger,System.Boolean,Serilog.Extensions.Logging.LoggerProviderCollection)">
|
||||
<summary>
|
||||
Sets Serilog as the logging provider.
|
||||
</summary>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
<param name="providers">A <see cref="T:Serilog.Extensions.Logging.LoggerProviderCollection"/> registered in the Serilog pipeline using the
|
||||
<c>WriteTo.Providers()</c> configuration method, enabling other <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s to receive events. By
|
||||
default, only Serilog sinks will receive events.</param>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<remarks>
|
||||
A <see cref="T:Microsoft.Extensions.Hosting.HostBuilderContext"/> is supplied so that configuration and hosting information can be used.
|
||||
The logger will be shut down when application services are disposed.
|
||||
</remarks>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<remarks>
|
||||
A <see cref="T:Microsoft.Extensions.Hosting.HostBuilderContext"/> is supplied so that configuration and hosting information can be used.
|
||||
The logger will be shut down when application services are disposed.
|
||||
</remarks>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<remarks>If the static <see cref="P:Serilog.Log.Logger"/> is a bootstrap logger (see
|
||||
<c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
|
||||
not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
|
||||
replaced entirely or ignored.</remarks>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="T:Serilog.SerilogServiceCollectionExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> with Serilog configuration methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,Serilog.ILogger,System.Boolean,Serilog.Extensions.Logging.LoggerProviderCollection)">
|
||||
<summary>
|
||||
Sets Serilog as the logging provider.
|
||||
</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
<param name="providers">A <see cref="T:Serilog.Extensions.Logging.LoggerProviderCollection"/> registered in the Serilog pipeline using the
|
||||
<c>WriteTo.Providers()</c> configuration method, enabling other <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s to receive events. By
|
||||
default, only Serilog sinks will receive events.</param>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<remarks>If the static <see cref="P:Serilog.Log.Logger"/> is a bootstrap logger (see
|
||||
<c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
|
||||
not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
|
||||
replaced entirely or ignored.</remarks>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -1,359 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Serilog.Extensions.Hosting</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Serilog.Extensions.Hosting.DiagnosticContext">
|
||||
<summary>
|
||||
Implements an ambient diagnostic context using <see cref="T:System.Threading.AsyncLocal`1"/>.
|
||||
</summary>
|
||||
<remarks>Consumers should use <see cref="T:Serilog.IDiagnosticContext"/> to set context properties.</remarks>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.#ctor(Serilog.ILogger)">
|
||||
<summary>
|
||||
Construct a <see cref="T:Serilog.Extensions.Hosting.DiagnosticContext"/>.
|
||||
</summary>
|
||||
<param name="logger">A logger for binding properties in the context, or <c>null</c> to use <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.BeginCollection">
|
||||
<summary>
|
||||
Start collecting properties to associate with the current diagnostic context. This will replace
|
||||
the active collector, if any.
|
||||
</summary>
|
||||
<returns>A collector that will receive properties added in the current diagnostic context.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.Set(System.String,System.Object,System.Boolean)">
|
||||
<inheritdoc cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.SetException(System.Exception)">
|
||||
<inheritdoc cref="M:Serilog.IDiagnosticContext.SetException(System.Exception)"/>
|
||||
</member>
|
||||
<member name="T:Serilog.Extensions.Hosting.DiagnosticContextCollector">
|
||||
<summary>
|
||||
A container that receives properties added to a diagnostic context.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.#ctor(System.IDisposable)">
|
||||
<summary>
|
||||
Construct a <see cref="T:Serilog.Extensions.Hosting.DiagnosticContextCollector"/>.
|
||||
</summary>
|
||||
<param name="chainedDisposable">An object that will be disposed to signal completion/disposal of
|
||||
the collector.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.AddOrUpdate(Serilog.Events.LogEventProperty)">
|
||||
<summary>
|
||||
Add the property to the context.
|
||||
</summary>
|
||||
<param name="property">The property to add.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.SetException(System.Exception)">
|
||||
<summary>
|
||||
Set the exception associated with the current diagnostic context.
|
||||
</summary>
|
||||
<example>
|
||||
Passing an exception to the diagnostic context is useful when unhandled exceptions are handled before reaching Serilog's
|
||||
RequestLoggingMiddleware. One example is using https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails to transform
|
||||
exceptions to ProblemDetails responses.
|
||||
</example>
|
||||
<remarks>
|
||||
If an unhandled exception reaches Serilog's RequestLoggingMiddleware, then the unhandled exception takes precedence.<br/>
|
||||
If <c>null</c> is given, it clears any previously assigned exception.
|
||||
</remarks>
|
||||
<param name="exception">The exception to log.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.TryComplete(System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@)">
|
||||
<summary>
|
||||
Complete the context and retrieve the properties added to it, if any. This will
|
||||
stop collection and remove the collector from the original execution context and
|
||||
any of its children.
|
||||
</summary>
|
||||
<param name="properties">The collected properties, or null if no collection is active.</param>
|
||||
<returns>True if properties could be collected.</returns>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.TryComplete(System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@,System.Exception@)">
|
||||
<summary>
|
||||
Complete the context and retrieve the properties and exception added to it, if any. This will
|
||||
stop collection and remove the collector from the original execution context and
|
||||
any of its children.
|
||||
</summary>
|
||||
<param name="properties">The collected properties, or null if no collection is active.</param>
|
||||
<param name="exception">The collected exception, or null if none has been collected or if no collection is active.</param>
|
||||
<returns>True if properties could be collected.</returns>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.SetException(System.Exception)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.Dispose">
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Serilog.Extensions.Hosting.ReloadableLogger">
|
||||
<summary>
|
||||
A Serilog <see cref="T:Serilog.ILogger"/> that can be reconfigured without invalidating existing <see cref="T:Serilog.ILogger"/>
|
||||
instances derived from it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Reload(System.Func{Serilog.LoggerConfiguration,Serilog.LoggerConfiguration})">
|
||||
<summary>
|
||||
Reload the logger using the supplied configuration delegate.
|
||||
</summary>
|
||||
<param name="configure">A callback in which the logger is reconfigured.</param>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="configure"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Freeze">
|
||||
<summary>
|
||||
Freeze the logger, so that no further reconfiguration is possible. Once the logger is frozen, logging through
|
||||
new contextual loggers will have no additional cost, and logging directly through this logger will not require
|
||||
any synchronization.
|
||||
</summary>
|
||||
<returns>The <see cref="T:Serilog.Core.Logger"/> configured with the final settings.</returns>
|
||||
<exception cref="T:System.InvalidOperationException">The logger is already frozen.</exception>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Dispose">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(Serilog.Core.ILogEventEnricher)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(System.Collections.Generic.IEnumerable{Serilog.Core.ILogEventEnricher})">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(System.String,System.Object,System.Boolean)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext``1">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(System.Type)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEvent)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.String)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``1(Serilog.Events.LogEventLevel,System.String,``0)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``2(Serilog.Events.LogEventLevel,System.String,``0,``1)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``3(Serilog.Events.LogEventLevel,System.String,``0,``1,``2)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.String,System.Object[])">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.Exception,System.String)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``1(Serilog.Events.LogEventLevel,System.Exception,System.String,``0)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``2(Serilog.Events.LogEventLevel,System.Exception,System.String,``0,``1)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``3(Serilog.Events.LogEventLevel,System.Exception,System.String,``0,``1,``2)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.Exception,System.String,System.Object[])">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.IsEnabled(Serilog.Events.LogEventLevel)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.BindMessageTemplate(System.String,System.Object[],Serilog.Events.MessageTemplate@,System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.BindProperty(System.String,System.Object,System.Boolean,Serilog.Events.LogEventProperty@)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Serilog.Hosting.SerilogLoggerFactory">
|
||||
<summary>
|
||||
Implements <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory"/> so that we can inject Serilog Logger.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.#ctor(Serilog.ILogger,System.Boolean)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Serilog.Hosting.SerilogLoggerFactory"/> class.
|
||||
</summary>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.Dispose">
|
||||
<summary>
|
||||
Disposes the provider.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.CreateLogger(System.String)">
|
||||
<summary>
|
||||
Creates a new <see cref="T:Microsoft.Extensions.Logging.ILogger" /> instance.
|
||||
</summary>
|
||||
<param name="categoryName">The category name for messages produced by the logger.</param>
|
||||
<returns>
|
||||
The <see cref="T:Microsoft.Extensions.Logging.ILogger" />.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.AddProvider(Microsoft.Extensions.Logging.ILoggerProvider)">
|
||||
<summary>
|
||||
Adds an <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider" /> to the logging system.
|
||||
</summary>
|
||||
<param name="provider">The <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider" />.</param>
|
||||
</member>
|
||||
<member name="T:Serilog.IDiagnosticContext">
|
||||
<summary>
|
||||
Collects diagnostic information for packaging into wide events.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)">
|
||||
<summary>
|
||||
Set the specified property on the current diagnostic context. The property will be collected
|
||||
and attached to the event emitted at the completion of the context.
|
||||
</summary>
|
||||
<param name="propertyName">The name of the property. Must be non-empty.</param>
|
||||
<param name="value">The property value.</param>
|
||||
<param name="destructureObjects">If true, the value will be serialized as structured
|
||||
data if possible; if false, the object will be recorded as a scalar or simple array.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.IDiagnosticContext.SetException(System.Exception)">
|
||||
<summary>
|
||||
Set the specified exception on the current diagnostic context.
|
||||
</summary>
|
||||
<remarks>
|
||||
This method is useful when unhandled exceptions do not reach <c>Serilog.AspNetCore.RequestLoggingMiddleware</c>,
|
||||
such as when using <a href="https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails">Hellang.Middleware.ProblemDetails</a>
|
||||
to transform exceptions to ProblemDetails responses.
|
||||
</remarks>
|
||||
<param name="exception">The exception to log. If <c>null</c> is given, it clears any previously assigned exception.</param>
|
||||
</member>
|
||||
<member name="T:Serilog.LoggerConfigurationExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Serilog.LoggerConfiguration"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.LoggerConfigurationExtensions.CreateBootstrapLogger(Serilog.LoggerConfiguration)">
|
||||
<summary>
|
||||
Create a <see cref="T:Serilog.Extensions.Hosting.ReloadableLogger"/> for use during host bootstrapping. The
|
||||
<see cref="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)"/>
|
||||
configuration overload will detect when <see cref="P:Serilog.Log.Logger"/> is set to a <see cref="T:Serilog.Extensions.Hosting.ReloadableLogger"/> instance, and
|
||||
reconfigure/freeze it so that <see cref="T:Serilog.ILogger"/>s created during host bootstrapping continue to work once
|
||||
logger configuration (with access to host services) is completed.
|
||||
</summary>
|
||||
<param name="loggerConfiguration"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Serilog.LoggerSettingsConfigurationExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Serilog.Configuration.LoggerSettingsConfiguration"/> with methods for consuming host services.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.LoggerSettingsConfigurationExtensions.Services(Serilog.Configuration.LoggerSettingsConfiguration,System.IServiceProvider)">
|
||||
<summary>
|
||||
Configure the logger using components from the <paramref name="services"/>. If present, the logger will
|
||||
receive implementations/instances of <see cref="T:Serilog.Core.LoggingLevelSwitch"/>, <see cref="T:Serilog.Core.IDestructuringPolicy"/>,
|
||||
<see cref="T:Serilog.Core.ILogEventFilter"/>, <see cref="T:Serilog.Core.ILogEventEnricher"/>, <see cref="T:Serilog.Core.ILogEventSink"/>, and
|
||||
<see cref="T:Serilog.Configuration.ILoggerSettings"/>.
|
||||
</summary>
|
||||
<param name="loggerSettingsConfiguration">The `ReadFrom` configuration object.</param>
|
||||
<param name="services">A <see cref="T:System.IServiceProvider"/> from which services will be requested.</param>
|
||||
<returns>A <see cref="T:Serilog.LoggerConfiguration"/> to support method chaining.</returns>
|
||||
</member>
|
||||
<member name="T:Serilog.SerilogHostBuilderExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Microsoft.Extensions.Hosting.IHostBuilder"/> with Serilog configuration methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,Serilog.ILogger,System.Boolean,Serilog.Extensions.Logging.LoggerProviderCollection)">
|
||||
<summary>
|
||||
Sets Serilog as the logging provider.
|
||||
</summary>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
<param name="providers">A <see cref="T:Serilog.Extensions.Logging.LoggerProviderCollection"/> registered in the Serilog pipeline using the
|
||||
<c>WriteTo.Providers()</c> configuration method, enabling other <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s to receive events. By
|
||||
default, only Serilog sinks will receive events.</param>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<remarks>
|
||||
A <see cref="T:Microsoft.Extensions.Hosting.HostBuilderContext"/> is supplied so that configuration and hosting information can be used.
|
||||
The logger will be shut down when application services are disposed.
|
||||
</remarks>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<remarks>
|
||||
A <see cref="T:Microsoft.Extensions.Hosting.HostBuilderContext"/> is supplied so that configuration and hosting information can be used.
|
||||
The logger will be shut down when application services are disposed.
|
||||
</remarks>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<remarks>If the static <see cref="P:Serilog.Log.Logger"/> is a bootstrap logger (see
|
||||
<c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
|
||||
not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
|
||||
replaced entirely or ignored.</remarks>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="T:Serilog.SerilogServiceCollectionExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> with Serilog configuration methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,Serilog.ILogger,System.Boolean,Serilog.Extensions.Logging.LoggerProviderCollection)">
|
||||
<summary>
|
||||
Sets Serilog as the logging provider.
|
||||
</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
<param name="providers">A <see cref="T:Serilog.Extensions.Logging.LoggerProviderCollection"/> registered in the Serilog pipeline using the
|
||||
<c>WriteTo.Providers()</c> configuration method, enabling other <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s to receive events. By
|
||||
default, only Serilog sinks will receive events.</param>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<remarks>If the static <see cref="P:Serilog.Log.Logger"/> is a bootstrap logger (see
|
||||
<c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
|
||||
not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
|
||||
replaced entirely or ignored.</remarks>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -1,359 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Serilog.Extensions.Hosting</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Serilog.Extensions.Hosting.DiagnosticContext">
|
||||
<summary>
|
||||
Implements an ambient diagnostic context using <see cref="T:System.Threading.AsyncLocal`1"/>.
|
||||
</summary>
|
||||
<remarks>Consumers should use <see cref="T:Serilog.IDiagnosticContext"/> to set context properties.</remarks>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.#ctor(Serilog.ILogger)">
|
||||
<summary>
|
||||
Construct a <see cref="T:Serilog.Extensions.Hosting.DiagnosticContext"/>.
|
||||
</summary>
|
||||
<param name="logger">A logger for binding properties in the context, or <c>null</c> to use <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.BeginCollection">
|
||||
<summary>
|
||||
Start collecting properties to associate with the current diagnostic context. This will replace
|
||||
the active collector, if any.
|
||||
</summary>
|
||||
<returns>A collector that will receive properties added in the current diagnostic context.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.Set(System.String,System.Object,System.Boolean)">
|
||||
<inheritdoc cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.SetException(System.Exception)">
|
||||
<inheritdoc cref="M:Serilog.IDiagnosticContext.SetException(System.Exception)"/>
|
||||
</member>
|
||||
<member name="T:Serilog.Extensions.Hosting.DiagnosticContextCollector">
|
||||
<summary>
|
||||
A container that receives properties added to a diagnostic context.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.#ctor(System.IDisposable)">
|
||||
<summary>
|
||||
Construct a <see cref="T:Serilog.Extensions.Hosting.DiagnosticContextCollector"/>.
|
||||
</summary>
|
||||
<param name="chainedDisposable">An object that will be disposed to signal completion/disposal of
|
||||
the collector.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.AddOrUpdate(Serilog.Events.LogEventProperty)">
|
||||
<summary>
|
||||
Add the property to the context.
|
||||
</summary>
|
||||
<param name="property">The property to add.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.SetException(System.Exception)">
|
||||
<summary>
|
||||
Set the exception associated with the current diagnostic context.
|
||||
</summary>
|
||||
<example>
|
||||
Passing an exception to the diagnostic context is useful when unhandled exceptions are handled before reaching Serilog's
|
||||
RequestLoggingMiddleware. One example is using https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails to transform
|
||||
exceptions to ProblemDetails responses.
|
||||
</example>
|
||||
<remarks>
|
||||
If an unhandled exception reaches Serilog's RequestLoggingMiddleware, then the unhandled exception takes precedence.<br/>
|
||||
If <c>null</c> is given, it clears any previously assigned exception.
|
||||
</remarks>
|
||||
<param name="exception">The exception to log.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.TryComplete(System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@)">
|
||||
<summary>
|
||||
Complete the context and retrieve the properties added to it, if any. This will
|
||||
stop collection and remove the collector from the original execution context and
|
||||
any of its children.
|
||||
</summary>
|
||||
<param name="properties">The collected properties, or null if no collection is active.</param>
|
||||
<returns>True if properties could be collected.</returns>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.TryComplete(System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@,System.Exception@)">
|
||||
<summary>
|
||||
Complete the context and retrieve the properties and exception added to it, if any. This will
|
||||
stop collection and remove the collector from the original execution context and
|
||||
any of its children.
|
||||
</summary>
|
||||
<param name="properties">The collected properties, or null if no collection is active.</param>
|
||||
<param name="exception">The collected exception, or null if none has been collected or if no collection is active.</param>
|
||||
<returns>True if properties could be collected.</returns>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.SetException(System.Exception)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.Dispose">
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Serilog.Extensions.Hosting.ReloadableLogger">
|
||||
<summary>
|
||||
A Serilog <see cref="T:Serilog.ILogger"/> that can be reconfigured without invalidating existing <see cref="T:Serilog.ILogger"/>
|
||||
instances derived from it.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Reload(System.Func{Serilog.LoggerConfiguration,Serilog.LoggerConfiguration})">
|
||||
<summary>
|
||||
Reload the logger using the supplied configuration delegate.
|
||||
</summary>
|
||||
<param name="configure">A callback in which the logger is reconfigured.</param>
|
||||
<exception cref="T:System.ArgumentNullException"><paramref name="configure"/> is null.</exception>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Freeze">
|
||||
<summary>
|
||||
Freeze the logger, so that no further reconfiguration is possible. Once the logger is frozen, logging through
|
||||
new contextual loggers will have no additional cost, and logging directly through this logger will not require
|
||||
any synchronization.
|
||||
</summary>
|
||||
<returns>The <see cref="T:Serilog.Core.Logger"/> configured with the final settings.</returns>
|
||||
<exception cref="T:System.InvalidOperationException">The logger is already frozen.</exception>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Dispose">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(Serilog.Core.ILogEventEnricher)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(System.Collections.Generic.IEnumerable{Serilog.Core.ILogEventEnricher})">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(System.String,System.Object,System.Boolean)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext``1">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.ForContext(System.Type)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEvent)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.String)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``1(Serilog.Events.LogEventLevel,System.String,``0)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``2(Serilog.Events.LogEventLevel,System.String,``0,``1)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``3(Serilog.Events.LogEventLevel,System.String,``0,``1,``2)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.String,System.Object[])">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.Exception,System.String)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``1(Serilog.Events.LogEventLevel,System.Exception,System.String,``0)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``2(Serilog.Events.LogEventLevel,System.Exception,System.String,``0,``1)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write``3(Serilog.Events.LogEventLevel,System.Exception,System.String,``0,``1,``2)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.Write(Serilog.Events.LogEventLevel,System.Exception,System.String,System.Object[])">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.IsEnabled(Serilog.Events.LogEventLevel)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.BindMessageTemplate(System.String,System.Object[],Serilog.Events.MessageTemplate@,System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.ReloadableLogger.BindProperty(System.String,System.Object,System.Boolean,Serilog.Events.LogEventProperty@)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="T:Serilog.Hosting.SerilogLoggerFactory">
|
||||
<summary>
|
||||
Implements <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory"/> so that we can inject Serilog Logger.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.#ctor(Serilog.ILogger,System.Boolean)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Serilog.Hosting.SerilogLoggerFactory"/> class.
|
||||
</summary>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.Dispose">
|
||||
<summary>
|
||||
Disposes the provider.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.CreateLogger(System.String)">
|
||||
<summary>
|
||||
Creates a new <see cref="T:Microsoft.Extensions.Logging.ILogger" /> instance.
|
||||
</summary>
|
||||
<param name="categoryName">The category name for messages produced by the logger.</param>
|
||||
<returns>
|
||||
The <see cref="T:Microsoft.Extensions.Logging.ILogger" />.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.AddProvider(Microsoft.Extensions.Logging.ILoggerProvider)">
|
||||
<summary>
|
||||
Adds an <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider" /> to the logging system.
|
||||
</summary>
|
||||
<param name="provider">The <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider" />.</param>
|
||||
</member>
|
||||
<member name="T:Serilog.IDiagnosticContext">
|
||||
<summary>
|
||||
Collects diagnostic information for packaging into wide events.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)">
|
||||
<summary>
|
||||
Set the specified property on the current diagnostic context. The property will be collected
|
||||
and attached to the event emitted at the completion of the context.
|
||||
</summary>
|
||||
<param name="propertyName">The name of the property. Must be non-empty.</param>
|
||||
<param name="value">The property value.</param>
|
||||
<param name="destructureObjects">If true, the value will be serialized as structured
|
||||
data if possible; if false, the object will be recorded as a scalar or simple array.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.IDiagnosticContext.SetException(System.Exception)">
|
||||
<summary>
|
||||
Set the specified exception on the current diagnostic context.
|
||||
</summary>
|
||||
<remarks>
|
||||
This method is useful when unhandled exceptions do not reach <c>Serilog.AspNetCore.RequestLoggingMiddleware</c>,
|
||||
such as when using <a href="https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails">Hellang.Middleware.ProblemDetails</a>
|
||||
to transform exceptions to ProblemDetails responses.
|
||||
</remarks>
|
||||
<param name="exception">The exception to log. If <c>null</c> is given, it clears any previously assigned exception.</param>
|
||||
</member>
|
||||
<member name="T:Serilog.LoggerConfigurationExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Serilog.LoggerConfiguration"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.LoggerConfigurationExtensions.CreateBootstrapLogger(Serilog.LoggerConfiguration)">
|
||||
<summary>
|
||||
Create a <see cref="T:Serilog.Extensions.Hosting.ReloadableLogger"/> for use during host bootstrapping. The
|
||||
<see cref="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)"/>
|
||||
configuration overload will detect when <see cref="P:Serilog.Log.Logger"/> is set to a <see cref="T:Serilog.Extensions.Hosting.ReloadableLogger"/> instance, and
|
||||
reconfigure/freeze it so that <see cref="T:Serilog.ILogger"/>s created during host bootstrapping continue to work once
|
||||
logger configuration (with access to host services) is completed.
|
||||
</summary>
|
||||
<param name="loggerConfiguration"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Serilog.LoggerSettingsConfigurationExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Serilog.Configuration.LoggerSettingsConfiguration"/> with methods for consuming host services.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.LoggerSettingsConfigurationExtensions.Services(Serilog.Configuration.LoggerSettingsConfiguration,System.IServiceProvider)">
|
||||
<summary>
|
||||
Configure the logger using components from the <paramref name="services"/>. If present, the logger will
|
||||
receive implementations/instances of <see cref="T:Serilog.Core.LoggingLevelSwitch"/>, <see cref="T:Serilog.Core.IDestructuringPolicy"/>,
|
||||
<see cref="T:Serilog.Core.ILogEventFilter"/>, <see cref="T:Serilog.Core.ILogEventEnricher"/>, <see cref="T:Serilog.Core.ILogEventSink"/>, and
|
||||
<see cref="T:Serilog.Configuration.ILoggerSettings"/>.
|
||||
</summary>
|
||||
<param name="loggerSettingsConfiguration">The `ReadFrom` configuration object.</param>
|
||||
<param name="services">A <see cref="T:System.IServiceProvider"/> from which services will be requested.</param>
|
||||
<returns>A <see cref="T:Serilog.LoggerConfiguration"/> to support method chaining.</returns>
|
||||
</member>
|
||||
<member name="T:Serilog.SerilogHostBuilderExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Microsoft.Extensions.Hosting.IHostBuilder"/> with Serilog configuration methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,Serilog.ILogger,System.Boolean,Serilog.Extensions.Logging.LoggerProviderCollection)">
|
||||
<summary>
|
||||
Sets Serilog as the logging provider.
|
||||
</summary>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
<param name="providers">A <see cref="T:Serilog.Extensions.Logging.LoggerProviderCollection"/> registered in the Serilog pipeline using the
|
||||
<c>WriteTo.Providers()</c> configuration method, enabling other <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s to receive events. By
|
||||
default, only Serilog sinks will receive events.</param>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<remarks>
|
||||
A <see cref="T:Microsoft.Extensions.Hosting.HostBuilderContext"/> is supplied so that configuration and hosting information can be used.
|
||||
The logger will be shut down when application services are disposed.
|
||||
</remarks>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<remarks>
|
||||
A <see cref="T:Microsoft.Extensions.Hosting.HostBuilderContext"/> is supplied so that configuration and hosting information can be used.
|
||||
The logger will be shut down when application services are disposed.
|
||||
</remarks>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<remarks>If the static <see cref="P:Serilog.Log.Logger"/> is a bootstrap logger (see
|
||||
<c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
|
||||
not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
|
||||
replaced entirely or ignored.</remarks>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="T:Serilog.SerilogServiceCollectionExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> with Serilog configuration methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,Serilog.ILogger,System.Boolean,Serilog.Extensions.Logging.LoggerProviderCollection)">
|
||||
<summary>
|
||||
Sets Serilog as the logging provider.
|
||||
</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
<param name="providers">A <see cref="T:Serilog.Extensions.Logging.LoggerProviderCollection"/> registered in the Serilog pipeline using the
|
||||
<c>WriteTo.Providers()</c> configuration method, enabling other <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s to receive events. By
|
||||
default, only Serilog sinks will receive events.</param>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<remarks>If the static <see cref="P:Serilog.Log.Logger"/> is a bootstrap logger (see
|
||||
<c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
|
||||
not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
|
||||
replaced entirely or ignored.</remarks>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -1,261 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Serilog.Extensions.Hosting</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Serilog.Extensions.Hosting.DiagnosticContext">
|
||||
<summary>
|
||||
Implements an ambient diagnostic context using <see cref="T:System.Threading.AsyncLocal`1"/>.
|
||||
</summary>
|
||||
<remarks>Consumers should use <see cref="T:Serilog.IDiagnosticContext"/> to set context properties.</remarks>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.#ctor(Serilog.ILogger)">
|
||||
<summary>
|
||||
Construct a <see cref="T:Serilog.Extensions.Hosting.DiagnosticContext"/>.
|
||||
</summary>
|
||||
<param name="logger">A logger for binding properties in the context, or <c>null</c> to use <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.BeginCollection">
|
||||
<summary>
|
||||
Start collecting properties to associate with the current diagnostic context. This will replace
|
||||
the active collector, if any.
|
||||
</summary>
|
||||
<returns>A collector that will receive properties added in the current diagnostic context.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.Set(System.String,System.Object,System.Boolean)">
|
||||
<inheritdoc cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContext.SetException(System.Exception)">
|
||||
<inheritdoc cref="M:Serilog.IDiagnosticContext.SetException(System.Exception)"/>
|
||||
</member>
|
||||
<member name="T:Serilog.Extensions.Hosting.DiagnosticContextCollector">
|
||||
<summary>
|
||||
A container that receives properties added to a diagnostic context.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.#ctor(System.IDisposable)">
|
||||
<summary>
|
||||
Construct a <see cref="T:Serilog.Extensions.Hosting.DiagnosticContextCollector"/>.
|
||||
</summary>
|
||||
<param name="chainedDisposable">An object that will be disposed to signal completion/disposal of
|
||||
the collector.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.AddOrUpdate(Serilog.Events.LogEventProperty)">
|
||||
<summary>
|
||||
Add the property to the context.
|
||||
</summary>
|
||||
<param name="property">The property to add.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.SetException(System.Exception)">
|
||||
<summary>
|
||||
Set the exception associated with the current diagnostic context.
|
||||
</summary>
|
||||
<example>
|
||||
Passing an exception to the diagnostic context is useful when unhandled exceptions are handled before reaching Serilog's
|
||||
RequestLoggingMiddleware. One example is using https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails to transform
|
||||
exceptions to ProblemDetails responses.
|
||||
</example>
|
||||
<remarks>
|
||||
If an unhandled exception reaches Serilog's RequestLoggingMiddleware, then the unhandled exception takes precedence.<br/>
|
||||
If <c>null</c> is given, it clears any previously assigned exception.
|
||||
</remarks>
|
||||
<param name="exception">The exception to log.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.TryComplete(System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@)">
|
||||
<summary>
|
||||
Complete the context and retrieve the properties added to it, if any. This will
|
||||
stop collection and remove the collector from the original execution context and
|
||||
any of its children.
|
||||
</summary>
|
||||
<param name="properties">The collected properties, or null if no collection is active.</param>
|
||||
<returns>True if properties could be collected.</returns>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.TryComplete(System.Collections.Generic.IEnumerable{Serilog.Events.LogEventProperty}@,System.Exception@)">
|
||||
<summary>
|
||||
Complete the context and retrieve the properties and exception added to it, if any. This will
|
||||
stop collection and remove the collector from the original execution context and
|
||||
any of its children.
|
||||
</summary>
|
||||
<param name="properties">The collected properties, or null if no collection is active.</param>
|
||||
<param name="exception">The collected exception, or null if none has been collected or if no collection is active.</param>
|
||||
<returns>True if properties could be collected.</returns>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)"/>
|
||||
<seealso cref="M:Serilog.IDiagnosticContext.SetException(System.Exception)"/>
|
||||
</member>
|
||||
<member name="M:Serilog.Extensions.Hosting.DiagnosticContextCollector.Dispose">
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Serilog.Hosting.SerilogLoggerFactory">
|
||||
<summary>
|
||||
Implements <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory"/> so that we can inject Serilog Logger.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.#ctor(Serilog.ILogger,System.Boolean)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:Serilog.Hosting.SerilogLoggerFactory"/> class.
|
||||
</summary>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.Dispose">
|
||||
<summary>
|
||||
Disposes the provider.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.CreateLogger(System.String)">
|
||||
<summary>
|
||||
Creates a new <see cref="T:Microsoft.Extensions.Logging.ILogger" /> instance.
|
||||
</summary>
|
||||
<param name="categoryName">The category name for messages produced by the logger.</param>
|
||||
<returns>
|
||||
The <see cref="T:Microsoft.Extensions.Logging.ILogger" />.
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.Hosting.SerilogLoggerFactory.AddProvider(Microsoft.Extensions.Logging.ILoggerProvider)">
|
||||
<summary>
|
||||
Adds an <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider" /> to the logging system.
|
||||
</summary>
|
||||
<param name="provider">The <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider" />.</param>
|
||||
</member>
|
||||
<member name="T:Serilog.IDiagnosticContext">
|
||||
<summary>
|
||||
Collects diagnostic information for packaging into wide events.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.IDiagnosticContext.Set(System.String,System.Object,System.Boolean)">
|
||||
<summary>
|
||||
Set the specified property on the current diagnostic context. The property will be collected
|
||||
and attached to the event emitted at the completion of the context.
|
||||
</summary>
|
||||
<param name="propertyName">The name of the property. Must be non-empty.</param>
|
||||
<param name="value">The property value.</param>
|
||||
<param name="destructureObjects">If true, the value will be serialized as structured
|
||||
data if possible; if false, the object will be recorded as a scalar or simple array.</param>
|
||||
</member>
|
||||
<member name="M:Serilog.IDiagnosticContext.SetException(System.Exception)">
|
||||
<summary>
|
||||
Set the specified exception on the current diagnostic context.
|
||||
</summary>
|
||||
<remarks>
|
||||
This method is useful when unhandled exceptions do not reach <c>Serilog.AspNetCore.RequestLoggingMiddleware</c>,
|
||||
such as when using <a href="https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails">Hellang.Middleware.ProblemDetails</a>
|
||||
to transform exceptions to ProblemDetails responses.
|
||||
</remarks>
|
||||
<param name="exception">The exception to log. If <c>null</c> is given, it clears any previously assigned exception.</param>
|
||||
</member>
|
||||
<member name="T:Serilog.LoggerSettingsConfigurationExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Serilog.Configuration.LoggerSettingsConfiguration"/> with methods for consuming host services.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.LoggerSettingsConfigurationExtensions.Services(Serilog.Configuration.LoggerSettingsConfiguration,System.IServiceProvider)">
|
||||
<summary>
|
||||
Configure the logger using components from the <paramref name="services"/>. If present, the logger will
|
||||
receive implementations/instances of <see cref="T:Serilog.Core.LoggingLevelSwitch"/>, <see cref="T:Serilog.Core.IDestructuringPolicy"/>,
|
||||
<see cref="T:Serilog.Core.ILogEventFilter"/>, <see cref="T:Serilog.Core.ILogEventEnricher"/>, <see cref="T:Serilog.Core.ILogEventSink"/>, and
|
||||
<see cref="T:Serilog.Configuration.ILoggerSettings"/>.
|
||||
</summary>
|
||||
<param name="loggerSettingsConfiguration">The `ReadFrom` configuration object.</param>
|
||||
<param name="services">A <see cref="T:System.IServiceProvider"/> from which services will be requested.</param>
|
||||
<returns>A <see cref="T:Serilog.LoggerConfiguration"/> to support method chaining.</returns>
|
||||
</member>
|
||||
<member name="T:Serilog.SerilogHostBuilderExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Microsoft.Extensions.Hosting.IHostBuilder"/> with Serilog configuration methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,Serilog.ILogger,System.Boolean,Serilog.Extensions.Logging.LoggerProviderCollection)">
|
||||
<summary>
|
||||
Sets Serilog as the logging provider.
|
||||
</summary>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
<param name="providers">A <see cref="T:Serilog.Extensions.Logging.LoggerProviderCollection"/> registered in the Serilog pipeline using the
|
||||
<c>WriteTo.Providers()</c> configuration method, enabling other <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s to receive events. By
|
||||
default, only Serilog sinks will receive events.</param>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<remarks>
|
||||
A <see cref="T:Microsoft.Extensions.Hosting.HostBuilderContext"/> is supplied so that configuration and hosting information can be used.
|
||||
The logger will be shut down when application services are disposed.
|
||||
</remarks>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogHostBuilderExtensions.UseSerilog(Microsoft.Extensions.Hosting.IHostBuilder,System.Action{Microsoft.Extensions.Hosting.HostBuilderContext,System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<remarks>
|
||||
A <see cref="T:Microsoft.Extensions.Hosting.HostBuilderContext"/> is supplied so that configuration and hosting information can be used.
|
||||
The logger will be shut down when application services are disposed.
|
||||
</remarks>
|
||||
<param name="builder">The host builder to configure.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<remarks>If the static <see cref="P:Serilog.Log.Logger"/> is a bootstrap logger (see
|
||||
<c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
|
||||
not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
|
||||
replaced entirely or ignored.</remarks>
|
||||
<returns>The host builder.</returns>
|
||||
</member>
|
||||
<member name="T:Serilog.SerilogServiceCollectionExtensions">
|
||||
<summary>
|
||||
Extends <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> with Serilog configuration methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,Serilog.ILogger,System.Boolean,Serilog.Extensions.Logging.LoggerProviderCollection)">
|
||||
<summary>
|
||||
Sets Serilog as the logging provider.
|
||||
</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="logger">The Serilog logger; if not supplied, the static <see cref="T:Serilog.Log"/> will be used.</param>
|
||||
<param name="dispose">When <c>true</c>, dispose <paramref name="logger"/> when the framework disposes the provider. If the
|
||||
logger is not specified but <paramref name="dispose"/> is <c>true</c>, the <see cref="M:Serilog.Log.CloseAndFlush"/> method will be
|
||||
called on the static <see cref="T:Serilog.Log"/> class instead.</param>
|
||||
<param name="providers">A <see cref="T:Serilog.Extensions.Logging.LoggerProviderCollection"/> registered in the Serilog pipeline using the
|
||||
<c>WriteTo.Providers()</c> configuration method, enabling other <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s to receive events. By
|
||||
default, only Serilog sinks will receive events.</param>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
<member name="M:Serilog.SerilogServiceCollectionExtensions.AddSerilog(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{System.IServiceProvider,Serilog.LoggerConfiguration},System.Boolean,System.Boolean)">
|
||||
<summary>Sets Serilog as the logging provider.</summary>
|
||||
<param name="collection">The service collection to use.</param>
|
||||
<param name="configureLogger">The delegate for configuring the <see cref="T:Serilog.LoggerConfiguration" /> that will be used to construct a <see cref="T:Serilog.Core.Logger" />.</param>
|
||||
<param name="preserveStaticLogger">Indicates whether to preserve the value of <see cref="P:Serilog.Log.Logger"/>.</param>
|
||||
<param name="writeToProviders">By default, Serilog does not write events to <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/>s registered through
|
||||
the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
|
||||
<c>true</c> to write events to all providers.</param>
|
||||
<remarks>If the static <see cref="P:Serilog.Log.Logger"/> is a bootstrap logger (see
|
||||
<c>LoggerConfigurationExtensions.CreateBootstrapLogger()</c>), and <paramref name="preserveStaticLogger"/> is
|
||||
not specified, the the bootstrap logger will be reconfigured through the supplied delegate, rather than being
|
||||
replaced entirely or ignored.</remarks>
|
||||
<returns>The service collection.</returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
WAzR48EJm7h3RQRAnlnMokbcHldUzGoOIIXKA8Tsr2YIjihNhUwjVXjbPQpEmoVAFUVLaGwLuxwpmsnAUuFKbQ==
|
||||
Reference in New Issue
Block a user