Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2966

Allow override of ILoggerFactory in DI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.2.3
    • 3.2.2
    • library
    • 1

    Description

      https://forums.couchbase.com/t/executioncontext-should-be-suppressed-loggerfactory-injection/31741

      Currently, if:

      services.AddCouchbase(options => {
          // Set other settings
          options.WithLogging(new NullLoggerFactory());
      });
      

      The WithLogging setting is ignored. This is because we override with the ILoggerFactory found in the DI container after the callback action is invoked to configure the options.

      Instead, we should be able to register an IConfigureOptions<ClusterOptions> in advance to register the logger. This way it is configured first and may be overridden.

      Attachments

        For Gerrit Dashboard: NCBC-2966
        # Subject Branch Project Status CR V

        Activity

          People

            btburnett3 Brant Burnett
            btburnett3 Brant Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty