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
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.2.2
    • 3.2.3
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          There are no comments yet on this issue.

          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