[ https://issues.apache.org/jira/browse/LOG4J2-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15235609#comment-15235609 ]
Remko Popma edited comment on LOG4J2-1343 at 4/11/16 6:02 PM: -------------------------------------------------------------- The solution to the above deadlock problem (as currently in master) still has issues because there are two objects that are locked on during Layout.encode(): the OutputStreamManager and the ByteBufferDestination. (This is not a problem if {{Constants.ENABLE_DIRECT_ENCODERS}} is false.) The cleanest solution is to collapse these two locks into one and let all OutputStreamManagers implement the ByteBufferDestination interface. This removes a lot of {{if (Constants.ENABLE_DIRECT_ENCODERS)...}} complexity from the managers. Custom appender/manager subclasses then also no longer need to worry if they can call the {{write(...)}} methods or if they first need to call {{ByteBufferDestination.drain(...)}}: all writing would first go to the buffer, then to the underlying output stream or randomAccessFile. Work for this is in progress on branch {{LOG4J2-1343-no-gc-os-appenders-bytebuffered}}. was (Author: rem...@yahoo.com): The solution to the above deadlock problem (as currently in master) still has issues because there are two objects that are locked on during Layout.encode(): the OutputStreamManager and the ByteBufferDestination. (This is not a problem if {{Constants.ENABLE_DIRECT_ENCODERS}} is false.) The cleanest solution is to collapse these two locks into one and let all OutputStreamManagers implement the ByteBufferDestination interface. This removes a lot of {{if (Constants.ENABLE_DIRECT_ENCODERS)...}} complexity from the managers. Custom appender/manager subclasses now also no longer need to worry if they can call the {{write(...)}} methods or if they first need to call {{ByteBufferDestination.drain(...)}}: all writing now goes first to the buffer, then to the underlying output stream or randomAccessFile. Work for this is in progress on branch {{LOG4J2-1343-no-gc-os-appenders-bytebuffered}}. > Update ConsoleAppender to utilize gc-free Layout method > ------------------------------------------------------- > > Key: LOG4J2-1343 > URL: https://issues.apache.org/jira/browse/LOG4J2-1343 > Project: Log4j 2 > Issue Type: Improvement > Components: Appenders > Affects Versions: 2.5 > Reporter: Remko Popma > Assignee: Remko Popma > Fix For: 2.6 > > > TBD: would we want to include this in the upcoming 2.6 release? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org