public sealed class GoogleCloudConsoleFormatter : ConsoleFormatter, IDisposable
Console formatter for use with Google Cloud Logging.
Implements
IDisposableNamespace
Google.Cloud.Logging.ConsoleAssembly
Google.Cloud.Logging.Console.dll
Constructors
GoogleCloudConsoleFormatter(IOptionsMonitor<GoogleCloudConsoleFormatterOptions>)
public GoogleCloudConsoleFormatter(IOptionsMonitor<GoogleCloudConsoleFormatterOptions> optionsMonitor)
Constructs a new formatter which uses the specified monitor to retrieve options and watch for options changes.
Parameter | |
---|---|
Name | Description |
optionsMonitor | IOptionsMonitor<GoogleCloudConsoleFormatterOptions> The monitor to observe for changes in options. Must not be null. |
Properties
FormatterName
public static string FormatterName { get; }
The name for the Google Cloud console formatter.
Property Value | |
---|---|
Type | Description |
String |
Methods
Write<TState>(in LogEntry<TState>, IExternalScopeProvider, TextWriter)
public override void Write<TState>(in LogEntry<TState> logEntry, IExternalScopeProvider scopeProvider, TextWriter textWriter)
Parameters | |
---|---|
Name | Description |
logEntry | LogEntry<TState> |
scopeProvider | IExternalScopeProvider |
textWriter | TextWriter |
Type Parameter | |
---|---|
Name | Description |
TState |
Microsoft.Extensions.Logging.Console.ConsoleFormatter.Write<TState>(Microsoft.Extensions.Logging.Abstractions.LogEntry<TState>, Microsoft.Extensions.Logging.IExternalScopeProvider, System.IO.TextWriter)
Explicit Interface Implementations
IDisposable.Dispose()
void IDisposable.Dispose()