log4j2 KeyValuePair for .properties file -


how create keyvaluepair in log4j2 in propterties file?

i know in log4j version 1 it's done like:

log4j.appender.x.additionalfields={'key': 'value'} 

and xml way in log4j2 is:

  <keyvaluepair key="key" value="value"/> 

so way properties file this:

`appender.x.keyvaluepair ={'key': 'value'}` 

?

this working example of how define key value pair example graylog2 (gelf) appender:

appender.graylog.type=gelf appender.graylog.name=graylog appender.graylog.server=yourhostname appender.graylog.includestacktrace=true appender.graylog.additionalfields.type=keyvaluepair appender.graylog.additionalfields.key=yarncontainer appender.graylog.additionalfields.value=containerxyz 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -