Closed qjw2bqn closed 5 years ago
Try making use of ${configsetting}
to lookup the ElasticSearchServerAddress-value for the Uri
-Target-property.
See also https://github.com/NLog/NLog/wiki/ConfigSetting-Layout-Renderer
Believe the plan is to remove ConnectionString-Lookup from this target.
Yes please use configsetting
, ConnectionStringName has been removed.
The version of 5.1 works fine,but upgrade to netcore 2.2,and NLog.Targets.ElasticSearch to 6.1, even though setting the
"ConnectionStrings": { "ElasticSearchServerAddress": "http://192.168.31.101:9200" }, in the appsetting.json file,it use the default url:localhost:9200 to connect the elk server.
But if use the uri work fine,change the uri to connectionString don't work!