diff --git a/src/NLog.Targets.ElasticSearch.Tests/NLog.Targets.ElasticSearch.Tests.csproj b/src/NLog.Targets.ElasticSearch.Tests/NLog.Targets.ElasticSearch.Tests.csproj
index d54632f..867ab24 100644
--- a/src/NLog.Targets.ElasticSearch.Tests/NLog.Targets.ElasticSearch.Tests.csproj
+++ b/src/NLog.Targets.ElasticSearch.Tests/NLog.Targets.ElasticSearch.Tests.csproj
@@ -6,8 +6,11 @@
-
-
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/src/NLog.Targets.ElasticSearch/ElasticSearchTarget.cs b/src/NLog.Targets.ElasticSearch/ElasticSearchTarget.cs
index 0d66eba..4fa64d2 100644
--- a/src/NLog.Targets.ElasticSearch/ElasticSearchTarget.cs
+++ b/src/NLog.Targets.ElasticSearch/ElasticSearchTarget.cs
@@ -145,12 +145,19 @@ public string CloudId
public Layout Index { get; set; } = "logstash-${date:format=yyyy.MM.dd}";
///
+ /// Obsolete and replaced by to match NLog naming convention.
/// Gets or sets whether to include all properties of the log event in the document
///
- public bool IncludeAllProperties { get; set; }
+ [Obsolete("Replaced by IncludeEventProperties")]
+ public bool IncludeAllProperties { get => IncludeEventProperties; set => IncludeEventProperties = value; }
///
- /// Gets or sets a comma separated list of excluded properties when setting
+ /// Gets or sets whether to include LogEvent Properties in the document
+ ///
+ public bool IncludeEventProperties { get; set; }
+
+ ///
+ /// Gets or sets a comma separated list of excluded properties when setting
///
public string ExcludedProperties { get; set; }
@@ -506,7 +513,7 @@ private Dictionary GenerateDocumentProperties(LogEventInfo logEv
}
}
- if (IncludeAllProperties && logEvent.HasProperties)
+ if (IncludeEventProperties && logEvent.HasProperties)
{
foreach (var p in logEvent.Properties)
{
diff --git a/src/NLog.Targets.ElasticSearch/IElasticSearchTarget.cs b/src/NLog.Targets.ElasticSearch/IElasticSearchTarget.cs
index 08cfc6e..c27e3a2 100644
--- a/src/NLog.Targets.ElasticSearch/IElasticSearchTarget.cs
+++ b/src/NLog.Targets.ElasticSearch/IElasticSearchTarget.cs
@@ -92,12 +92,19 @@ public interface IElasticSearchTarget
Layout Index { get; set; }
///
+ /// Obsolete and replaced by to match NLog naming convention.
/// Gets or sets whether to include all properties of the log event in the document
///
+ [Obsolete("Replaced by IncludeEventProperties")]
bool IncludeAllProperties { get; set; }
///
- /// Gets or sets a comma separated list of excluded properties when setting
+ /// Gets or sets whether to include LogEvent Properties in the document
+ ///
+ bool IncludeEventProperties { get; set; }
+
+ ///
+ /// Gets or sets a comma separated list of excluded properties when setting
///
string ExcludedProperties { get; set; }
diff --git a/src/NLog.Targets.ElasticSearch/NLog.Targets.ElasticSearch.csproj b/src/NLog.Targets.ElasticSearch/NLog.Targets.ElasticSearch.csproj
index e2167f4..4767639 100644
--- a/src/NLog.Targets.ElasticSearch/NLog.Targets.ElasticSearch.csproj
+++ b/src/NLog.Targets.ElasticSearch/NLog.Targets.ElasticSearch.csproj
@@ -14,10 +14,10 @@
true
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file