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

Add params for others service fields #113

Closed
vlaborie opened this issue Nov 20, 2020 · 6 comments · Fixed by #116
Closed

Add params for others service fields #113

vlaborie opened this issue Nov 20, 2020 · 6 comments · Fixed by #116
Labels

Comments

@vlaborie
Copy link
Contributor

Ecs-logging-java permit to define the service.name but no others service fields.

Can you add params for service.type and service.version ?

@felixbarny
Copy link
Member

felixbarny commented Nov 20, 2020

You can add arbitrary additional fields. Example for log4j2:

  <KeyValuePair key="service.version" value="1.2.3"/>

@vlaborie
Copy link
Contributor Author

It is also possible with jul and log4j ?

@felixbarny
Copy link
Member

Currently, that's not possible. Would you be interested in contributing support for it?

@vlaborie
Copy link
Contributor Author

I would, but i am not a Java developer.

Have you any plan to implement this in the near future ?

@felixbarny
Copy link
Member

I see what I can do but I can't make promises.

As a workaround, could you just set all the information into service.name?

@felixbarny
Copy link
Member

Thank's for adding additional fields to log4j and JUL.

I tested it and it work well for log4j but doesn't work for JUL.

I tried to add co.elastic.logging.jul.EcsFormatter.additionalFields=key1=value1,key2=value2 in my Tomcat logging.properties like specified in documentation but nothing happened

Thanks for reporting. Not sure why you deleted that comment.
This should be fixed by #118

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

Successfully merging a pull request may close this issue.

2 participants