Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

GelfLayout for log4j2 1.2 does not expose includeLocation property #149

Closed
manasvigupta opened this issue Jun 25, 2018 · 3 comments
Closed
Labels
type: bug A general bug

Comments

@manasvigupta
Copy link

manasvigupta commented Jun 25, 2018

Hi,

I am seeing this warning when i use "includeLocation" attribute as param with log4j 1.2

log4j:WARN No such property [includeLocation] in biz.paluch.logging.gelf.log4j.GelfLayout.

It seems that setter for "includeLocation" is missing in GelfLayout.java.

Log4j.xml configuration

   <layout class="biz.paluch.logging.gelf.log4j.GelfLayout">
       <param name="ExtractStackTrace" value="true" />
       <param name="IncludeLocation" value="false" />
       <param name="MdcFields" value="X-Correlation-Id" />
   </layout>

pom.xml dependencies -

<dependency>
    <groupId>biz.paluch.logging</groupId>
    <artifactId>logstash-gelf</artifactId>
    <version>1.12.0</version>
</dependency>
<dependency>
  <groupId>log4j</groupId>
  <artifactId>log4j</artifactId>
  <version>1.2.16</version>
</dependency>

Thanks
Manasvi

@mp911de mp911de added the type: bug A general bug label Jun 27, 2018
@mp911de mp911de added this to the logstash-gelf 1.12.1 milestone Jun 27, 2018
@mp911de mp911de changed the title "includeLocation" property does not work with log4j 1.2 GelfLayout for log4j2 1.2 does not expose includeLocation property Jun 27, 2018
@mp911de
Copy link
Owner

mp911de commented Jun 27, 2018

Thanks, that's fixed now.

@mp911de mp911de closed this as completed Jun 27, 2018
@manasvigupta
Copy link
Author

Hi,

Thanks for fixing this issue.

Would it be possible to release this fix as non-snapshot (as it seems to have been merged in snapshot version)?

Thanks
Manasvi

@mp911de
Copy link
Owner

mp911de commented Jul 1, 2018

Yes, it will be released. There's no date scheduled for 1.12.1. Feel free to build your own version and deploy it to your artifact repository, if you run one until a release is available.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants