-
Notifications
You must be signed in to change notification settings - Fork 202
Description
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);
}
}