Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

Commit 7591772

Browse files
mariwingMarius Wingerei
and
Marius Wingerei
authored
Proper handling of TypeName = null from appsettings.json (#420)
Co-authored-by: Marius Wingerei <[email protected]>
1 parent f14e29f commit 7591772

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Serilog.Sinks.Elasticsearch/LoggerConfigurationElasticSearchExtensions.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,7 @@ public static LoggerConfiguration Elasticsearch(
204204
options.TemplateName = templateName;
205205
}
206206

207-
if (!string.IsNullOrWhiteSpace(typeName))
208-
{
209-
options.TypeName = typeName;
210-
}
207+
options.TypeName = !string.IsNullOrWhiteSpace(typeName) ? typeName : null;
211208

212209
options.BatchPostingLimit = batchPostingLimit;
213210
options.BatchAction = batchAction;

0 commit comments

Comments
 (0)