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

templateCustomSettings loaded from settings.json file #315

Merged
merged 3 commits into from
May 5, 2020

Conversation

tresoldigiorgio
Copy link
Contributor

Does this PR introduce a breaking change?
NO

Other information:
added templateCustomSettings to sink constructor for configurations loaded from settings.json file

Giorgio Tresoldi and others added 3 commits January 20, 2020 10:32
…ngs-fix

added templateCustomSettings to sink constructor for configurations loaded from settings.json file
@tresoldigiorgio
Copy link
Contributor Author

I don't know if this is the correct way to do a second PR. I don't understand why it takes the commits that I had already merged

@mivano
Copy link
Contributor

mivano commented Feb 15, 2020

Somewhat confusing PR as it contains code that is already merged. I understand that you want to add the dictionary of optional settings for the template to the ES function? What is the reason to specify it like this? To use it in the appconfig?

@tresoldigiorgio
Copy link
Contributor Author

Yes. I use the "appsettings.json" file to configure serilog. this is my example configuration:
{ "Serilog": { "Using": [ "Serilog.Sinks.Elasticsearch" ], "WriteTo": [ { "Name" : "Elasticsearch", "Args" : { "nodeUris" : "http://localhost:9200", "indexFormat" : "test-fields", "overwriteTemplate": true, "autoRegisterTemplate": true, "autoRegisterTemplateVersion": 2, "numberOfShards" : 1, "numberOfReplicas" : 0, "templateCustomSettings": { "index.mapping.total_fields.limit": "10000000" } } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithExceptionDetails", "WithThreadId" ], "Properties": { "Application": "AppName" } } }

@mivano mivano merged commit a80118b into serilog-contrib:dev May 5, 2020
@mivano
Copy link
Contributor

mivano commented May 5, 2020

Merged to dev, updated readme.md file as well. Please try the alpha package and see if this suits your needs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants