public static class JdbcAppender.Builder<B extends JdbcAppender.Builder<B>> extends AbstractDatabaseAppender.Builder<B> implements Builder<JdbcAppender>
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
JdbcAppender |
build()
Builds the object after all configuration has been set.
|
long |
getReconnectIntervalMillis() |
boolean |
isImmediateFail() |
B |
setBufferSize(int bufferSize)
If an integer greater than 0, this causes the appender to buffer log events and flush whenever the buffer
reaches this size.
|
B |
setColumnConfigs(ColumnConfig... columnConfigs)
Information about the columns that log event data should be inserted into and how to insert that data.
|
B |
setColumnMappings(ColumnMapping... columnMappings) |
B |
setConnectionSource(ConnectionSource connectionSource)
The connections source from which database connections should be retrieved.
|
void |
setImmediateFail(boolean immediateFail) |
void |
setReconnectIntervalMillis(long reconnectIntervalMillis) |
B |
setTableName(String tableName)
The name of the database table to insert log events into.
|
B |
setTruncateStrings(boolean truncateStrings) |
getConfiguration, getErrorPrefix, getLayout, getName, getOrCreateLayout, getOrCreateLayout, isIgnoreExceptions, setConfiguration, setIgnoreExceptions, setLayout, setName, withConfiguration, withIgnoreExceptions, withLayout, withName
asBuilder, getFilter, getPropertyArray, setFilter, setPropertyArray, withFilter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getErrorPrefix, isValid
public JdbcAppender build()
Builder
build
in interface Builder<JdbcAppender>
public long getReconnectIntervalMillis()
public boolean isImmediateFail()
public B setBufferSize(int bufferSize)
bufferSize
- buffer size.public B setColumnConfigs(ColumnConfig... columnConfigs)
columnConfigs
- Column configurations.public B setColumnMappings(ColumnMapping... columnMappings)
public B setConnectionSource(ConnectionSource connectionSource)
connectionSource
- The connections source.public void setImmediateFail(boolean immediateFail)
public void setReconnectIntervalMillis(long reconnectIntervalMillis)
public B setTableName(String tableName)
tableName
- The database table name.public B setTruncateStrings(boolean truncateStrings)
Copyright © 1999-2023 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.