majikthys / log4j2-logstash-jsonevent-layout

Log4J2 Layout as a Logstash "json_event"
Other
40 stars 34 forks source link

Add a new parameter "newline" to LogStashJSONLayout that formats compact events on separate lines. #1

Closed michaelsembwever closed 10 years ago

michaelsembwever commented 10 years ago

From docs: If "true", adds newline after each event, only applicable when compact=true, defaults to "false".

majikthys commented 10 years ago

Can we move the conditional up to the constructor and define a new field to accomplish this? The notion being that we needn't check per each logevent serialization, but just once per layout instantiation. (This sounds like a nit-pick, but in logging we want to make sure to be as conservative as possible with conditionals b/c we know this particular method will be used more frequently than most).

michaelsembwever commented 10 years ago

Can we move the conditional up to the constructor and define a new field to accomplish this?

done.

majikthys commented 10 years ago

Looks great! Thanks!