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

NullReferenceException thrown unless the LogManager is explicitly configured.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.4.0-dp3
    • 2.4.0
    • library
    • None

    Description

      The client needs a default configuration for LogManager so that the following is not thrown, for example:

      LogManager.ConfigureLoggerFactory(new LoggerFactory());
      

      System.TypeInitializationException was unhandled
      HResult=-2146233036
      Message=The type initializer for 'Couchbase.Configuration.Client.ClientConfiguration' threw an exception.
      Source=Couchbase.NetClient
      TypeName=Couchbase.Configuration.Client.ClientConfiguration
      StackTrace:
      at Couchbase.Configuration.Client.ClientConfiguration..ctor()
      at ConsoleApp1.Program.Main(String[] args) in c:\users\jmorris\documents\visual studio 2015\Projects\ConsoleApp2\src\ConsoleApp1\Program.cs:line 15
      InnerException:
      HResult=-2147467261
      Message=Value cannot be null.
      Parameter name: factory
      ParamName=factory
      Source=Microsoft.Extensions.Logging.Abstractions
      StackTrace:
      at Microsoft.Extensions.Logging.LoggerFactoryExtensions.CreateLogger(ILoggerFactory factory, Type type)
      at Couchbase.Logging.LogManager.GetLogger(Type type)
      at Couchbase.Configuration.Client.ClientConfiguration..cctor()
      InnerException:

      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

            jmorris Jeff Morris
            jmorris Jeff Morris
            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