Closed wpearson4 closed 9 years ago
@wpearson4 Can you post your log4net configuration here? It would be your app.config or your separate log4net xml config file. Whichever you're using.
I have fixed the problem. I need to change the reference to the following: appender name="ElasticSearchAppender" type="log4net.ElasticSearch.ElasticSearchAppender, log4net.ElasticSearch.Net40"
One last question currently I send json serialized string as the message. It appears though elasticsearch only recognizes it as a string. Does log4net.elasticsearch support sending the message as json
@wpearson4 glad you got it working! That's what I was going to look for if you posted your config here.
For adding custom information to the message object, I would highly recommend using a custom exception class which is a very common practice. You can see an example of how to do that here: https://gist.github.com/jptoto/9be57ce2fe253eb96739
Then the ES docs will look like this and you can query on them the same way:
Good Morning,
I have added the package to my project via nuget. I am receiving the following error when trying to log the first time: Could not create Appender [ElasticSearchAppender] of type [log4net.ElasticSearch.ElasticSearchAppender, log4net.ElasticSearch]. Reported error follows. System.IO.FileNotFoundException: Could not load file or assembly 'log4net.ElasticSearch' or one of its dependencies. The system cannot find the file specified. File name: 'log4net.ElasticSearch'.
I can see the assembly referenced in references. It is references as log4net.ElasticSearch40