Interface ConnectionSource
- All Superinterfaces:
LifeCycle
- All Known Implementing Classes:
AbstractConnectionSource
,AbstractDriverManagerConnectionSource
,DataSourceConnectionSource
,DriverManagerConnectionSource
,FactoryMethodConnectionSource
Configuration element for
JdbcAppender
. If you want to use the JdbcAppender
but none of the provided
connection sources meet your needs, you can simply create your own connection source.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle
LifeCycle.State
-
Method Summary
Modifier and TypeMethodDescriptionThis should return a new connection every time it is called.toString()
All implementations must overrideObject.toString()
to provide information about the connection configuration (obscuring passwords with one-way hashes).
-
Method Details
-
getConnection
This should return a new connection every time it is called.- Returns:
- the SQL connection object.
- Throws:
SQLException
- if a database error occurs.
-
toString
String toString()All implementations must overrideObject.toString()
to provide information about the connection configuration (obscuring passwords with one-way hashes).
-