Home

Awesome

Build status License NuGet NuGet

NLog adapter for Unity container

Unity extension to integrate with popular NLog logger.

Getting Started

Install-Package Unity.NLog

Registration:

container = new UnityContainer();
container.AddNewExtension<NLogExtension>();
public class LoggedType
{
    public LoggedType(ILogger log)
    {
    }
  ...
}
var ext = new NLogExtension{
    GetName = (t, n) => t.Name
};
container.AddExtension(ext);

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct

Contributing

See the Contributing guide for more information.

.NET Foundation

Unity Container is a .NET Foundation project