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

JBoss AS7 logging - Disable MessageParam# splitting. #87

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

JBoss AS7 logging - Disable MessageParam# splitting. #87

darrenmok opened this issue Jun 23, 2016 · 6 comments
Labels
type: enhancement A general enhancement

Comments

@darrenmok
Copy link

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

Please have a configuration to disable this.

@mp911de
Copy link
Owner

mp911de commented Jun 23, 2016

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

@mp911de mp911de added the type: enhancement A general enhancement label Jun 23, 2016
@birnbuazn
Copy link

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
Copy link

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
Copy link

@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
Copy link

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
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
Copy link
Owner

mp911de commented Dec 3, 2016

That's implemented now with 10eae2f.

@mp911de mp911de closed this as completed Dec 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants