Moocar / logback-gelf

Logback plugin to send GELF messages to graylog2 server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error initializing static fields

muuki88 opened this issue · comments

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

  • "ch.qos.logback" % "logback-core" % "1.1.2"
  • "ch.qos.logback" % "logback-classic" % "1.1.2"
  • "org.slf4j" % "slf4j-api" % "1.7.6"
  • "me.moocar" % "logback-gelf" % "0.2"

I build a snapshot version myself and now things work.

Same problem here!

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

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

Any ETA on a release with this fix in it?

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.

Done. Should be up in maven central in 2 hours

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

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
#62 (comment).

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

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