[
https://issues.apache.org/jira/browse/LOG4J2-1389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16005033#comment-16005033
]
Rafal Foltynski commented on LOG4J2-1389:
-----------------------------------------
[~garydgregory] this argument seems to be 100% valid in case of [JacksonFactory
and
JacksonFactory.JSON|https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JacksonFactory.java],
but is it really the case in
[AbstractJacksonLayout|https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/AbstractJacksonLayout.java]?
This layout has nice API which could easily be reused to override ObjectWriter
in cases where user would like to e.g.: provide it's own Jackson annotations
for
[ObjectMessage|https://github.com/apache/logging-log4j2/blob/master/log4j-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java]'s
or even amend the ones defined for LogEvent by default.
Right now he's forced to use AbstractStringLayout and copy the code.
> Jackson Layout classes private
> ------------------------------
>
> Key: LOG4J2-1389
> URL: https://issues.apache.org/jira/browse/LOG4J2-1389
> Project: Log4j 2
> Issue Type: Question
> Components: Layouts
> Affects Versions: 2.5
> Reporter: Roland Jungnickel
> Priority: Minor
>
> I was wondering why the Jackson Layout classes like
> https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JacksonFactory.java
> or
> https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/AbstractJacksonLayout.java
> are private. This makes extending them in other projects very hard.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)