Unity adapter for log4net
Перейти к файлу
Eugene Sadovoi 27b606ea55
Create FUNDING.yml
2021-06-14 10:01:01 -07:00
.github Create FUNDING.yml 2021-06-14 10:01:01 -07:00
src Bump log4net from 2.0.8 to 2.0.10 in /src 2021-01-29 19:49:08 +00:00
tests Version fix 2020-04-20 20:20:20 -07:00
.gitignore Initial commit 2018-01-09 09:04:40 -05:00
LICENSE Copyright © .NET Foundation and Contributors. 2020-05-13 15:50:35 -07:00
README.md Adding .Net Foundation links 2020-05-14 13:37:11 -07:00
appveyor.yml Releasing 5.9.0 2019-01-22 20:44:13 -05:00
package.props Releasing 5.11.2 2021-01-29 16:45:32 -08:00
package.sln Added projects 2018-01-10 23:58:19 -05:00

README.md

Build status License NuGet NuGet

log4net adapter for Unity container

Unity extension to integrate with popular log4net logger.

Getting Started

  • Reference the Unity.log4net package from NuGet.
Install-Package Unity.log4net

Registration

  • Add Log4NetExtension extension to the container
container = new UnityContainer();
container.AddNewExtension<Log4NetExtension>();
  • Where required add ILog interface to resolved constructor.
public class LoggedType
{
    public LoggedType(ILog log)
    {
    }
  ...
}
  • Log normally...

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