Logging with Castle.Facilities.Logging and log4net

前端 未结 6 1672
轻奢々
轻奢々 2020-12-06 11:49

I\'m trying to get log4net integration for Castle Windsor working. I wrote my class with an public property of type ILogger and took the configuration in my app

6条回答
  •  醉话见心
    2020-12-06 12:23

    Note that you can use the following in recent Castle versions:

    container.AddFacility(f => f.UseLog4Net().WithAppConfig());
    

    This will use Log4net for logging and search for the log4net config section in the application configuration file.

提交回复
热议问题