Unity adapter for log4net
Перейти к файлу
Eugene Sadovoi ab0ec2c074 Merge branch 'v5.x' of https://github.com/unitycontainer/log4net into v5.x
# Conflicts:
#	src/Log4NetExtension.cs
2019-05-19 21:09:59 -04:00
src Merge branch 'v5.x' of https://github.com/unitycontainer/log4net into v5.x 2019-05-19 21:09:59 -04:00
tests Add a logger name test in case of resolving an object graph. 2019-05-19 21:01:58 -04: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 Releasing 5.9.0 2019-01-22 20:44:13 -05:00
package.props Working on 5.11.0 2019-04-25 20:51:55 -04: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...