Skip to content

backwards compat break with 2.2 factor adapters #55

@michael-lang

Description

@michael-lang

I am having trouble finding any documentation on what actually changed with Common.Logging 2.2. Specifically, what changed with implementing factory adapters? I was running with common logging 2.1.2 and my factor adapter and configuration worked. And now it doesn't with common logging 2.2 (from NuGet).

This is the error I get:

An exception of type 'Common.Logging.ConfigurationException' occurred in Common.Logging.Core.dll but was not handled in user code

Additional information: Unable to create instance of type Candor.WindowsAzure.Logging.Common.Table.CloudTableLoggerFactoryAdapter. Possible explanation is lack of zero arg and single arg NameValueCollection constructors

Inner exception:
Constructor on type 'Candor.WindowsAzure.Logging.Common.Table.CloudTableLoggerFactoryAdapter' not found.

I do have a constructor, and it worked with 2.1.2. What kind of constructor do I need to add?

Here is my code repository:
https://github.com/michael-lang/candor-common/tree/master/Candor.WindowsAzure.Logging.Common/Table

And the current code noted in the common logging exception:

public class CloudTableLoggerFactoryAdapter : AbstractCachingLoggerFactoryAdapter
{
    private readonly string _connectionName;

    public CloudTableLoggerFactoryAdapter(NameValueCollection properties)
    {
        _connectionName = properties["ConnectionName"];
    }
    protected override ILog CreateLogger(string name)
    {
        return new CloudTableLogger(_connectionName, name);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions