ab0ec2c074
# Conflicts: # src/Log4NetExtension.cs |
||
---|---|---|
src | ||
tests | ||
.gitignore | ||
LICENSE | ||
README.md | ||
appveyor.yml | ||
package.props | ||
package.sln |
README.md
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...