Moocar / logback-gelf

Logback plugin to send GELF messages to graylog2 server
Apache License 2.0
147 stars 59 forks source link

Error initializing static fields #62

Closed muuki88 closed 9 years ago

muuki88 commented 9 years ago

Hi,

I'm using the template from the README.md, but my logger fails to initialize the static fields. The error message is:

-ERROR in ch.qos.logback.core.joran.spi.Interpreter@38:66 - no applicable action for [staticField], current ElementPath  is [[configuration][appender][encoder][layout][staticField]]
-ERROR in ch.qos.logback.core.joran.spi.Interpreter@39:24 - no applicable action for [key], current ElementPath  is [[configuration][appender][encoder][layout][staticField][key]]
-ERROR in ch.qos.logback.core.joran.spi.Interpreter@40:26 - no applicable action for [value], current ElementPath  is [[configuration][appender][encoder][layout][staticField][value]]

The fields are not available in graylog2.

part of my prod-logger.xml

<appender name="GELF UDP APPENDER" class="me.moocar.logbackgelf.GelfUDPAppender">
   ...
   <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
      <layout class="me.moocar.logbackgelf.GelfLayout">
         ...
         <staticField class="me.moocar.logbackgelf.Field">
            <key>_environment</key>
            <value>prod</value>
         </staticField>
      </layout>
   </encoder>
</appender>

My library dependencies

muuki88 commented 9 years ago

I build a snapshot version myself and now things work.

kidpollo commented 9 years ago

Same problem here!

kidpollo commented 9 years ago

@muuki88 can you re-open the issue it stil is not resolved

kidpollo commented 9 years ago

Ugh nvm I see that the Readme updated but there has not been a release with this change yet

kedgecomb commented 8 years ago

Any ETA on a release with this fix in it?

Moocar commented 8 years ago

Sorry everyone. I've been terrible on this. I haven't used Java or Graylog for 4 years now so my interest in maintaining this project is almost non existent. If anyone is keen on taking over, I'd be more than happy to transfer it over. In the meantime, I'll create a release now.

Moocar commented 8 years ago

Done. Should be up in maven central in 2 hours

muuki88 commented 8 years ago

np @Moocar thx for the release. We should search on twitter for a maintainer :)

Moocar commented 8 years ago

Done :) https://twitter.com/Moocar/status/690036974531547136

kedgecomb commented 8 years ago

Yup, thanks for the release - works great. Sorry to see you go!

On Thu, Jan 21, 2016 at 12:03 AM, Anthony Marcar notifications@github.com wrote:

Done :) https://twitter.com/Moocar/status/690036974531547136

— Reply to this email directly or view it on GitHub https://github.com/Moocar/logback-gelf/issues/62#issuecomment-173451725.

Purna2008 commented 7 years ago

HI, is there any new release for the additionalField fix please?

Moocar commented 7 years ago

@Purna2008 as per the README, I'm not supporting this project anymore so there won't be anymore releases.