logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Maire (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1397) Support ByteBufferLayout
Date Thu, 09 Jun 2016 06:55:20 GMT

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

Anthony Maire commented on LOG4J2-1397:
---------------------------------------

At first sight, this approach may work correctly in a single-threaded context, but I think
you need 1 more preallocated buffer than the ringbuffer size (so need to use a modulo instead
of a binary mask).

However in our application, this code can be invoked by several threads.
Since the order in which buffers are obtained from the pre-allocated pool might not be the
same as the order they are in the ringbuffer, the application will then need a callback to
know that a buffer has been released (i.e logged to disk).



> Support ByteBufferLayout
> ------------------------
>
>                 Key: LOG4J2-1397
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1397
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Layouts
>    Affects Versions: 2.6
>            Reporter: Remko Popma
>
> As requested by Kirk Pepperdine on the Mechanical Sympathy [mailing list|https://groups.google.com/d/msg/mechanical-sympathy/klefjRqlpQE/-1WF59IGAwAJ]:
> Support a new Layout that takes ObjectMessages containing a ByteBuffer payload and write
them to the appender without modification.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message