Class ClientLoggingOptions
Exposes client options for logging within a ClientPipeline.
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: System.ClientModel.dll
Syntax
[System.Runtime.CompilerServices.Nullable(0)]
[System.Runtime.CompilerServices.NullableContext(1)]
public class ClientLoggingOptions
Constructors
ClientLoggingOptions()
Declaration
public ClientLoggingOptions ();
Properties
AllowedHeaderNames
Gets or sets a list of header names that are not redacted during logging.
Declaration
public System.Collections.Generic.IList<string> AllowedHeaderNames { get; }
Property Value
System.Collections.Generic.IList<System.String>
Defaults to a list of common header names that do not typically hold sensitive information. |
AllowedQueryParameters
Gets or sets a list of query parameter names that are not redacted during logging.
Declaration
public System.Collections.Generic.IList<string> AllowedQueryParameters { get; }
Property Value
System.Collections.Generic.IList<System.String>
Defaults to a list of common query parameters that do not typically hold sensitive information. |
EnableLogging
Gets or sets value indicating if logging should be enabled in this client pipeline.
Declaration
public Nullable<bool> EnableLogging { get; set; }
Property Value
System.Nullable<System.Boolean>
Defaults to |
EnableMessageContentLogging
Gets or sets value indicating if request and response content should be logged.
Declaration
public Nullable<bool> EnableMessageContentLogging { get; set; }
Property Value
System.Nullable<System.Boolean>
Defaults to |
EnableMessageLogging
Gets or sets value indicating if request and response uri and header information should be logged.
Declaration
public Nullable<bool> EnableMessageLogging { get; set; }
Property Value
System.Nullable<System.Boolean>
Defaults to |
LoggerFactory
Gets or sets the implementation of Microsoft.Extensions.Logging.ILoggerFactory to use to create Microsoft.Extensions.Logging.ILogger instances for logging.
Declaration
[System.Runtime.CompilerServices.Nullable(2)]
[get: System.Runtime.CompilerServices.NullableContext(2)]
[set: System.Runtime.CompilerServices.NullableContext(2)]
public Microsoft.Extensions.Logging.ILoggerFactory LoggerFactory { get; set; }
Property Value
Microsoft.Extensions.Logging.ILoggerFactory
Defaults to Microsoft.Extensions.Logging.Abstractions.NullLoggerFactory. |
Remarks
If an ILoggerFactory is not provided, logs will be written to Event Source
instead. If an ILoggerFactory is provided, logs will be written to ILogger only and not
Event Source.
MessageContentSizeLimit
Gets or sets value indicating maximum size of content to log in bytes.
Declaration
public Nullable<int> MessageContentSizeLimit { get; set; }
Property Value
System.Nullable<System.Int32>
Defaults to |
Methods
AssertNotFrozen()
Assert that Freeze() has not been called on this ClientLoggingOptions instance.
Declaration
protected void AssertNotFrozen ();
Exceptions
System.InvalidOperationException
Thrown when an attempt is made to change the state of this ClientLoggingOptions instance after Freeze() has been called. |
Freeze()
Freeze this instance of ClientLoggingOptions. After this method has been called, any attempt to set properties on the instance or call methods that would change its state will throw System.InvalidOperationException.
Declaration
public virtual void Freeze ();