Skip to content
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

New event fields to be able to store info from log4j, log4net, nlog, ... frequently used log frameworks #97

Closed
vbohata opened this issue Aug 20, 2018 · 9 comments

Comments

@vbohata
Copy link

vbohata commented Aug 20, 2018

I propose to add several fields frequently used in Pattern Layout in log4j, log4net, nlog, ... log frameworks.

@ruflin
Copy link
Member

ruflin commented Aug 22, 2018

  • logger: I would expect this to go into agent.name
  • context: I think there will be separate discussion around context soon. Not sure if this fits into their.
  • event.class = java class? event.method ? Could you share some examples?

@vbohata
Copy link
Author

vbohata commented Aug 22, 2018

No, logger is not the same as agent.name, agent.name could be filebeat (or something which collects logs of some app), logger is name choosen by programmer of some java or .net app to specify which part of app logged that info. This is not module, or ... this is just logger name, you can find it in pattern layouts of specified log frameworks (https://docs.oracle.com/javase/7/docs/api/java/util/logging/Logger.html ...).
Yes class.name and class.method.name for name of the Java or .NET class and method. In our company we have a lot of custom apps and almost half of these apps are logging class name and method name at least in test env.

@ruflin
Copy link
Member

ruflin commented Aug 24, 2018

In general I like the idea of having a definition for this. We started some discussions to add a log4j module to Filebeat and this would play into this. The part I'm not sure yet is if this would be in the scope of ECS.

Do you see the above mainly for Java apps / service or a broader scope?

@vbohata
Copy link
Author

vbohata commented Aug 24, 2018

Almost all of our apps we need logs from are written in Java or .NET C#. They are usually using log4j, log4j2, log4net or nlog which shares most fields. We are currently gathering logs from tens of them, in future hundereds. So as these frameworks are very common (similar frameworks exists also for other programming languages) I think it should be part of ECS.

@willemdh
Copy link
Contributor

We have similar requirements for a 'logger' ecs field and also 'thread_name'

@webmat webmat mentioned this issue Sep 18, 2018
26 tasks
@ruflin ruflin mentioned this issue Oct 31, 2018
22 tasks
@wolframhaussig
Copy link

I would like to have fields for logger and thread_name too. In any application I have seen the logging contained those fields independently from the programming language: .Net, Java, C++

@willemdh
Copy link
Contributor

willemdh commented Apr 5, 2019

Is there any reason why ECS wouldn't integrate this? I have so many logs created by microservices using log4j2 that contain a thread_name and logger field.. It feels like there is a piece of the puzzle missing now.

@ruflin "logger: I would expect this to go into agent.name" => This doesn't apply as the microservice logs I'm talking about are indexed from Openshift with Filebeat. So the agent.name would be FIlebeat?

@vbohata
Copy link
Author

vbohata commented Jul 30, 2019

As a result of #321 there is a new field event.provider which is great but there still should be a new field event.logger. To be honest all of the following fields would help us very much:

  • event.provider (done)
  • event.logger
  • event.component (could be renamed from event.module as event.module is not much general)

@felixbarny
Copy link
Member

With the recent additions to ECS I think we can close this issue:

NDC should be mapped to tags and MDC should be mapped to `labels. See also https://github.com/elastic/java-ecs-logging/blob/master/README.md#mapping

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

No branches or pull requests

5 participants