You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Andres Luuk (JIRA)" <ji...@apache.org> on 2018/11/18 13:20:00 UTC

[jira] [Closed] (LOG4J2-2413) Exceptions are added to all columns when a JDBC Appender's ColumnMapping uses a Pattern

     [ https://issues.apache.org/jira/browse/LOG4J2-2413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andres Luuk closed LOG4J2-2413.
-------------------------------

> 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
>            Assignee: Gary Gregory
>            Priority: Major
>             Fix For: 3.0.0, 2.11.2
>
>
> 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)