Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2185

Add a simple JDBC DriverManager-based ConnectionSource that uses JDBC's DriverManager#getConnection(String, String, String)

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.11.0
    • Component/s: Appenders
    • Labels:
      None

      Description

      Add a simple DriverManagerConnectionSource that uses JDBC's DriverManager#getConnection(String, String, String)

      /**
       * A {@link ConnectionSource} that uses a JDBC connection string, a user name, and a password to call
       * {@link DriverManager#getConnection(String, String, String)}.
       * <p>
       * This plugin does not provide any connection pooling unless it is available through the connection string and driver
       * itself. This handy to get you off the ground without having to deal with JNDI.
       * </p>
       */
      @Plugin(name = "DriverManager", category = Core.CATEGORY_NAME, elementType = "connectionSource", printObject = true)
      public final class DriverManagerConnectionSource implements ConnectionSource
      

      This connection source also supports passing in properties for more complex configurations.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                garydgregory Gary Gregory
                Reporter:
                garydgregory Gary Gregory
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: