Commons Dbcp
  1. Commons Dbcp
  2. DBCP-194

BasicDataSource.setLogWriter should not do createDataSource

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      The code for setLogWriter is:

      public void setLogWriter(PrintWriter logWriter) throws SQLException

      { createDataSource().setLogWriter(logWriter); this.logWriter = logWriter; }

      This means that before a custom log writer is set a datasource is created. Any logging happening while creating the datasource is directed to stdout / stderr.

      I think the purpose of setting a log writer is to prevent this, at least that is what I am trying to achieve.

        Activity

        Kees de Kooter created issue -
        Kees de Kooter made changes -
        Field Original Value New Value
        Attachment AbandonedObjectPool.patch [ 12345934 ]
        Phil Steitz made changes -
        Fix Version/s 1.3 [ 12311977 ]
        Dain Sundstrom made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Kees de Kooter
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development