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

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16690904#comment-16690904 ] 

ASF GitHub Bot commented on LOG4J2-2413:
----------------------------------------

Github user andresluuk commented on the issue:

    https://github.com/apache/logging-log4j2/pull/211
  
    Fix made in https://github.com/apache/logging-log4j2/commit/4613ba9fec04933cc73a351dfb2ed5fb6000ad27#diff-2acf44a35ca607f3b8e7378ec7823405 will close this one


> 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)