Comments (8)
@Pragmateek Thanks for the report! I'll check into this ASAP and see if I've got it implemented correctly.
from log4net.elasticsearch.
@jptoto Thanks for the quick feedback!
I'm probably missing something and doing stupid things. :)
from log4net.elasticsearch.
@Pragmateek What field in the Elasticsearch document are you looking for the event information? Now that you've added this note, it's made me realize that the ConversionPattern may be completely irrelevant to logging in Elasticsearch since all the fields are logged in the ES document anyway. Since all the fields are there, there isn't really any work to be done by choosing a pattern as if it were in a text log file.
Which field in the Elasticsearch document are you looking for the converted text?
from log4net.elasticsearch.
@jptoto This is the message
field.
I had the same reflexion before posting but I though it could be applied anyway as it may ease future searches: you only have to look to the message
field without crafting queries that span multiple fields, and you could more easily compare with information extracted from files and console output.
But if this is by-design I'm completely OK with it and I can confirm this to my colleagues to adapt the way we use these logs. :)
from log4net.elasticsearch.
@jptoto Moreover one of my colleagues reminds me of another use-case where we can't do without the ConversionPattern
: in order to identify which application is logging it is possible to add a tag like [MyApplication]
to the ConversionPattern
so that every message will be decorated accordingly.
Or if your appender supports addition of a dedicated field, say "appName", to the ElasticSearch index, this would be a cleaner alternative to messages decoration.
Thanks.
from log4net.elasticsearch.
@Pragmateek The application is available in the "domain" field of the ES document. That is the appdomain. I'm pretty sure I've covered all the possible fields that are available from log4net so they are easily readable from the index. Really, that would remove the need to using a ConversionPattern because, unlike in text or DB log file where fields may be limited, in log4net.ElasticSearch, I simply log all the fields.
It's possible to use the ConversionPattern to format the message field but I haven't had any requests for that as yet. This is an image showing a basic layout of how the doc would look in ES http://take.ms/fGQt2 and you can see in the domain field is the appdomain so you can tell which application is logging the message.
from log4net.elasticsearch.
@jptoto Thanks for these information.
So finally we've decided to let the message unformatted and play with the domain
field if necessary.
Thanks again for your help and keep up the good job! :-)
from log4net.elasticsearch.
No problem! @Pragmateek I take the feedback seriously so please let me know if you have any other concerns or issues.
I'm going to update the documentation accordingly to mention that ConversionPattern isn't needed.
from log4net.elasticsearch.
Related Issues (20)
- docker problem HOT 1
- Link to project at nuget.org broken HOT 2
- Logs are not logged HOT 2
- Performance issue while generating logs in loop HOT 1
- Can't see logs even there is no error HOT 2
- Bad Request (400) returned from Elasticsearch Server (v7.4.2) HOT 4
- Httpclient - httpresponse issue HOT 5
- Logging not working on production HOT 2
- Please sign the assembly strong name HOT 3
- how to add perameter in index value HOT 1
- Index name with format date YYYY.MM instead YYYY.MM.DD HOT 4
- No new Release? HOT 1
- To be Delete
- Problem If having Empty connection string HOT 9
- AWS Elastic Search Service connection issue with log4Net HOT 1
- Is there a way to store the connection string encrypted?
- Can't set property in config HOT 3
- Can't log to kibana HOT 1
- Error - Could not create SSL/TLS secure channel when using Azure Elastic-Search HOT 2
- Is the project alive? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log4net.elasticsearch.