Uploaded image for project: 'Log4php'
  1. Log4php
  2. LOG4PHP-207

Support for MongoClient and replica sets

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.0
    • 2.3.0
    • Code

    Description

      Having a MongoDB appender for log4php has been great! Thanks.
      I had some difficulty deploying it to my production environment due to the driver version and replica set config, so here are the changes I made. I did my best to make these changes transparent so that they would not break existing installs.

      The Mongo PHP client is deprecated and replaced by the MongoClient class. This is an improved driver and has support for new options including write concerns.

      This patch will use MongoClient if it is available and will fall back to Mongo if it is not.

      Support for multiple hosts has been added to the connect string. If the connect string is not a valid MongoDB url, then one will be created from the host and port properties.

      New properties:
      writeConcern - What the driver should wait for when writing to the database (if supported).

      writeConcernTimeout - How long the driver should wait to satisfy the writeConcern (if supported).

      replicaSet - The name of the replica set to connect to (if any).

      Attachments

        1. patch.txt
          9 kB
          Richard Safran
        2. patch.txt
          9 kB
          Richard Safran
        3. 0001-LOG4PHP-207-Using-class-MongoClient-instead-of-Mongo.patch
          21 kB
          Vladimír Gorej
        4. 0001-Mongo-appender-documentation-update.patch
          9 kB
          Vladimír Gorej
        5. 0001-LOG4PHP-207-Fix-BC-issue-with-host-parameter.patch
          1 kB
          Vladimír Gorej
        6. 0001-Fix-BC-issue-with-host-parameter.patch
          1 kB
          Vladimír Gorej

        Activity

          People

            juice Ivan Habunek
            rsafran Richard Safran
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: