[
https://issues.apache.org/jira/browse/LOG4J2-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16389019#comment-16389019
]
Gary Gregory commented on LOG4J2-1839:
--------------------------------------
Hi [~tamas.misik],
Would you mind providing a PR on GitHub?
[https://github.com/apache/logging-log4j2]
Thank you,
Gary
> JdbcAppender.createAppender deprecated
> --------------------------------------
>
> Key: LOG4J2-1839
> URL: https://issues.apache.org/jira/browse/LOG4J2-1839
> Project: Log4j 2
> Issue Type: Improvement
> Components: Appenders
> Affects Versions: 2.8.1
> Reporter: Krzysztof Szymko
> Priority: Major
>
> As I was migrating 2.7 to 2.8.1 I followed JdbcAppender.<B>newBuilder() API
> to build JDBC appender:
> return JdbcAppender.<B>newBuilder()
> .setBufferSize(bufferSizeInt)
> .setColumnConfigs(columnConfigs)
> .setConnectionSource(connectionSource)
> .setTableName(tableName)
> .withName(name)
> .withIgnoreExceptions(ignoreExceptions)
> .withFilter(filter)
> .build();
> But then I got NPE from JdbcDatabaseManagerFactory @ 275, since
> I did not set any columnMappings. After providing
> .setColumnMappings(columnMappingJDBC)
> to my builder it worked OK. I would suggest to either improve the javadoc or
> add NULL check in JdbcDatabaseManagerFactory.createManager
> as JdbcAppender javadoc says that ColumnMapping is optional:
> This Appender writes logging events to a relational database using standard
> JDBC mechanisms. It takes a list of
> * {@link ColumnConfig}s and/or {@link ColumnMapping}s with
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)