[
https://issues.apache.org/jira/browse/LOG4J2-2413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Gregory updated LOG4J2-2413:
---------------------------------
Summary: Exceptions are added to all columns when a JDBC Appender's
ColumnMapping uses a Pattern (was: Using JDBCAppender-s ColumnMapping with
Pattern)
> Exceptions are added to all columns when a JDBC Appender's ColumnMapping uses
> a Pattern
> ---------------------------------------------------------------------------------------
>
> Key: LOG4J2-2413
> URL: https://issues.apache.org/jira/browse/LOG4J2-2413
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.11.1
> Reporter: Andres Luuk
> Priority: Major
>
> I think there is a bug in ColumnMapping build() on creating the Layout from
> pattern.
> It should also include: .withAlwaysWriteExceptions(false) in there.
> Currently if you add logger.error(e.getMessage(), e) somewhere it will try to
> insert the stack into every database field if patterns is used to create the
> ColumnMapping's.
> This comes from the default behaviour of PatternLayout that in case of an
> excepiton it tryes to add it in the end of every pattern.
> But if you have Multiple columins in your table with JDBCAppender then you
> probably have other metadata on those fields then the actual exception and
> you will get an insertion error on most fields because the data is to big.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)