Unity adapter for log4net
Перейти к файлу
Eugene Sadovoi 255b77f795 Releasing 5.9.0 2019-01-22 19:15:23 -05:00
src Releasing 5.9.0 2019-01-22 19:15:23 -05:00
tests Releasing 5.9.0 2019-01-22 19:15:23 -05:00
.gitignore Initial commit 2018-01-09 09:04:40 -05:00
LICENSE Initial commit 2018-01-09 09:04:40 -05:00
README.md Update README.md 2018-01-12 08:52:15 -05:00
appveyor.yml - cmd: dotnet test --framework net47 --verbosity q 2018-01-11 19:50:58 -05:00
package.props Releasing 5.9.0 2019-01-22 18:51:41 -05: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...