Table of Contents

Class LoggingAttribute

Namespace
Quilt4Net.Toolkit
Assembly
Quilt4Net.Toolkit.dll

By default, all endpoinds that starts with Api is logged, not other endpoinds. If this attributes is added, logging will be performed on that endpoind independent on the path. To disable logging for an endpoint add the attribute and set the property Enabled=false. For streamed output to work, set the property ResponseBody=false or Enabled=false. Logged request data: Method, Path, Headers (optional), Query (optional), Body (optional), ClientIp Logged response data: StatusCode, Headers (optional), Body (optional)

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method)]
public class LoggingAttribute : Attribute
Inheritance
LoggingAttribute
Inherited Members

Properties

Enabled

Enable or disable all logging disregarding other properties.

public bool Enabled { get; set; }

Property Value

bool

RequestBody

Enable or disable logging of the request body.

public bool RequestBody { get; set; }

Property Value

bool

ResponseBody

Enable or disable logging of the request body. This needs to be set to false when the output is streamed.

public bool ResponseBody { get; set; }

Property Value

bool