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

JBoss AS7 logging - Disable MessageParam# splitting. #87

Closed
darrenmok opened this Issue Jun 23, 2016 · 6 comments

Comments

4 participants
@darrenmok

darrenmok commented Jun 23, 2016

Using JBoss AS7 logging handler, will split params in the message to "MessageParam#={value}"

Please have a configuration to disable this.

@mp911de

This comment has been minimized.

Owner

mp911de commented Jun 23, 2016

How about a Pull-Request? MessageParam affects only java.util.logging and it's subtypes.

@birnbuazn

This comment has been minimized.

birnbuazn commented Sep 19, 2016

@djmoky83 You can always filter out the MessageParam fields using logstash

filter {
    mutate {
        remove_field => ["MessageParam0", "MessageParam1", "MessageParam2", "MessageParam3", "MessageParam4", "MessageParam5", "MessageParam6", "MessageParam7", "MessageParam8", "MessageParam9" ]
    }
}
@sohilpatel

This comment has been minimized.

sohilpatel commented Sep 28, 2016

Hi @birnbuazn,

That's correct what you said above but sometimes number format exception/other kind of exceptions occur in the ELK logs because of that.
e.g. MapperParsingException[failed to parse [MessageParam4]]; nested: NumberFormatException[For input string: "[]"];

It would be avoidable if there is a configuration to disable all message params.

@birnbuazn

This comment has been minimized.

birnbuazn commented Sep 28, 2016

@sohilpatel These exceptions only occur within ElasticSearch, if you do not filter out the fields. Whether you do that within the GELF logger or within Logstash is irrelevant.

@sohilpatel

This comment has been minimized.

sohilpatel commented Sep 28, 2016

Hi @birnbuazn,

Yes you are correct. I updated my filter configuration properly and exception disappeared. Thanks for that. :)

mp911de added a commit that referenced this issue Dec 3, 2016

Allow configuration of log message parameter inclusion #87
Java.util.logging-based log handlers can be now configured whether to include log message parameters in the GELF message with includeLogMessageParameters=true/false, defaults to true.

Log event message parameters are usually used together with message bundles:

logger.log(Level.INFO, "my.message.key", new Object[] { "hello", "my", "world" });

@mp911de mp911de added this to the logstash-gelf 1.11.1 milestone Dec 3, 2016

@mp911de

This comment has been minimized.

Owner

mp911de commented Dec 3, 2016

That's implemented now with 10eae2f.

@mp911de mp911de closed this Dec 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment