-
Notifications
You must be signed in to change notification settings - Fork 89
Home
Rolf Kristensen edited this page Nov 14, 2018
·
48 revisions
<targets>
<target xsi:type="ElasticSearch"
name="String"
uri="String"
index="Layout"
documentType="Layout"
includeAllProperties="Boolean"
excludedProperties="String"
connectionStringName="String"
disableAutomaticProxyDetection="Boolean"
requireAuth="Boolean"
username="String"
password="String">
<field name="String" layout="Layout" layoutType="Type" /><!-- repeated, optional -->
</target>
</targets>
- name - Name of the target. String
- uri - Uri of a Elasticsearch node. Multiple can be passed comma separated. String Default: http://localhost:9200
- index - Index to write to, if it doesn't exist it will be created. Layout Default: logstash-${date:format=yyyy.MM.dd}
- documentType - Type of document. Layout Default: logevent
- fields - A collection of fields. Each field contains a mapping between a NLog layout and a named field.
- includeAllProperties - Optionally include all properties from the log event. Boolean Default: False
- excludedProperties - Works with includeAllProperties to exclude specific properties. String
- connectionStringName - Optionally retrieve the Uri from a connection string. String
- disableAutomaticProxyDetection (since version 2.0.5) - Optionally disable automatic proxy detection. Boolean
- requireAuth - Optionally enable basic authentication. Boolean Default: False
- username - Username for basic authentication. String
- password - Password for basic authentication. String
<target xsi:type="ElasticSearch">
<field name="mdlc" layoutType="System.Object">
<layout xsi:type="JsonLayout" includeMdlc="true" />
</field>
</target>