[ 
https://issues.apache.org/jira/browse/LOG4J2-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14272005#comment-14272005
 ] 

Gary Gregory edited comment on LOG4J2-908 at 1/17/15 5:34 AM:
--------------------------------------------------------------

If you check the gist output, I get the footer. Perhaps the original reporter 
is showing output is from a still running program, but I don't see the same 
behavior. 

Which package does the serialization to json? For my specific use case, I could 
hack it to put a newline per json object. 

Something like:
{noformat}
{ "timeMillis" : 1419975785011, "thread" : "main", "level" : "TRACE", 
"loggerName" : "Log4j2Example", "message" : "Entering Log4j Example.", 
"endOfBatch" : false, "loggerFqcn" : 
"org.apache.logging.log4j.spi.AbstractLogger"}
{ "timeMillis" : 1419975785155, "thread" : "main", "level" : "DEBUG", 
"loggerName" : "Log4j2Example", "message" : "\tDebug Level", "endOfBatch" : 
false, "loggerFqcn" : "org.apache.logging.log4j.spi.AbstractLogger"}
{noformat}

would be perfectly cromulent for the purpose of piping logs into logstash. 


was (Author: patrickflaherty):
If you check the gist output, I get the footer. Perhaps the original reporter 
is showing output is from a still running program, but I don't see the same 
behavior. 

Which package does the serialization to json? For my specific use case, I could 
hack it to put a newline per json object. 

Something like:
{ "timeMillis" : 1419975785011, "thread" : "main", "level" : "TRACE", 
"loggerName" : "Log4j2Example", "message" : "Entering Log4j Example.", 
"endOfBatch" : false, "loggerFqcn" : 
"org.apache.logging.log4j.spi.AbstractLogger"}
{ "timeMillis" : 1419975785155, "thread" : "main", "level" : "DEBUG", 
"loggerName" : "Log4j2Example", "message" : "\tDebug Level", "endOfBatch" : 
false, "loggerFqcn" : "org.apache.logging.log4j.spi.AbstractLogger"}

would be perfectly cromulent for the purpose of piping logs into logstash. 

> JSONLayout doesn't add a comma between log events
> -------------------------------------------------
>
>                 Key: LOG4J2-908
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-908
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Layouts
>    Affects Versions: 2.1
>            Reporter: Konstantinos Liakos
>
> JSONLayout doesn't output a comma (,) between the log events. This makes it 
> quite difficult to read and deserialize the log files.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to