t0xa / gelfj

Graylog Extended Log Format (GELF) implementation in Java and log4j appender without any dependencies.
https://github.com/t0xa/gelfj/wiki
Other
187 stars 115 forks source link

Curly Braces around Position parameter String leads to exception in GelfHandler #115

Open rthaenert opened 8 years ago

rthaenert commented 8 years ago

When using a positional parameter string like the following: {%1$s} the GelfHandler throws an uncatched exception.

It probably is a good idea to either make this behaviour configurable (to disable MessageFormat) or change the ordering of the formatters or to catch the exceptions. Other loggers we use do not show this behaviour . Is there any workaround for that?

I added a reproducer under e5a47300d8dd3e00ef69b015cf2d6ece17111101.