-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArgumentException: Target cannot be found: 'ElasticSearch' #104
Comments
The frontpage https://github.com/markmcdowell/NLog.Targets.ElasticSearch suggests that you add the following to the top of the nlog.config: <extensions>
<add assembly="NLog.Targets.ElasticSearch"/>
</extensions> |
OK ,thanks, It has worked |
one more thing,i have got a exception that Error initializing target Exception: System.ArgumentException: Argument can not be an empty collection when I want set ESUrl by appsetting, exception info as
my appsetting as
my nlog xml as
|
Maybe the NLog.config is being loaded before having fully initialized the ConfigSetting (so it returns empty value). See also: NLog/NLog.Extensions.Logging#265 And see also: https://github.com/NLog/NLog/wiki/Reinitialize-NLog-configuration |
ok . thanks |
NLog.Web.AspNetCore ver 4.9.3 has been released, and now you can do this:
That replaces the old style:
|
I have a problem when i use ElasticSearch in asp.net core;
my code as
my nlog xml as :
my csproj as
The text was updated successfully, but these errors were encountered: