Show / Hide Table of Contents

Class ErrorLogOptions

The options to be used by a ErrorHandlerMiddleware.

Inheritance
System.Object
ErrorLogOptions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: StoneCo.Framework.Log.Options
Assembly: cs.temp.dll.dll
Syntax
public class ErrorLogOptions
Examples

Representation on appsettings.json file.

{
  "Host": {
    "ApplicationHost": "http://localhost/",
    "ApplicationName": "Name of Application"
  },
  "Logs": {
    "Error": {
      "Enable": true,
      "Host": "https://domain-of-api-log.com/",
      "Uri": "v1/log",
      "Tags": [ "Foo", "Error", "HostApi" ],
      "SensitiveProperties": [ "password" ],
      "IgnoreException": true,
      "ViewDetailsOnResponse": false
    }
  }
}

Properties

Enable

Set to use error log or not.

Declaration
public bool Enable { get; set; }
Property Value
Type Description
System.Boolean

True to enable, otherwise, false.

Host

The URL that identify host of the log.

Declaration
public string Host { get; set; }
Property Value
Type Description
System.String

https://domain-of-api-log.com/

IgnoreException

Ignore exceptions at the time the error log is generated.

Declaration
public bool IgnoreException { get; set; }
Property Value
Type Description
System.Boolean

True to enable, otherwise, false.

SensitiveProperties

Properties that should be masked.

Declaration
public string[] SensitiveProperties { get; set; }
Property Value
Type Description
System.String[]

cvv, pin, password, token, ...

Tags

Tags to index query from log.

Declaration
public string[] Tags { get; set; }
Property Value
Type Description
System.String[]

Microservice, ErrorLog

Uri

URI that identify the resource to registry new entry in log.

Declaration
public string Uri { get; set; }
Property Value
Type Description
System.String

v1/log

ViewDetailsOnResponse

Inform whether the error details will be view on response or not.

Declaration
public bool ViewDetailsOnResponse { get; set; }
Property Value
Type Description
System.Boolean

True to enable, otherwise, false.

Back to top Generated by DocFX