Castle Logging Facility是否支持log4Net.Config.XmlConfigurator.ConfigureAndWatch()的功能?我想使用Windsor日志记录工具,但我真的希望能够在运行时更改日志记录配置。任何人都可以指出我如何完成这一任务?Castle Logging Facility和log4net.Config.XmlConfigurator
1
A
回答
1
根据Castle源库中的file,Castle log4net实现确实(或可以)执行ConfigureAndWatch。我没有使用城堡,所以我不能评论如何利用这一点。我的第一个猜测是它应该“只是工作”。如果您正在使用Castle,并且可以将其日志记录配置为使用log4net,则可能已获得ConfigureAndWatch。如果您在自己的配置文件(而不是app.config或web.config)中配置log4net,ConfigureAndWatch可能会起作用。测试(如果您已经使用Castle)不应太难,以查看ConfigureAndWatch是否按预期工作。
如果您尚未使用Castle,您可能需要等待有人熟悉Castle和Castle日志以发布答案。
这里是另一个SO张贴关于城堡的日志记录,你可能会发现有用:
这一个显示在app.config/web.config中log4net的配置(接受的答案是从2010年2月,我不知道如果有可用与否)更多最新信息:
Logging with Castle.Facilities.Logging and log4net
祝你好运!
相关问题
- 1. Castle Windsor Typed Factory Facility
- 2. 你在哪里下载NHibernate Castle Facility?
- 3. ravendb,castle IoC,Wcf facility - doc session liefstyle
- 4. Global.asax和Logging
- 5. 我是否需要svc文件来为非HTTP服务设置Castle Wcf Facility
- 6. log4j和Commons Logging共存
- 7. SecurityException和Bouncy Castle
- 8. Enterprise Library 5.0中的log4net.Config.XmlConfigurator的等效物
- 9. Logging InputStream
- 10. PreparedStatement Logging
- 11. commons-logging-api-1.1.jar vs. commons-logging-1.2.jar
- 12. WCF Castle Windsor和WAS
- 13. Castle Core 2.5.2和DynamicProxy
- 14. Wcf Castle Windsor
- 15. Castle Windsor 3 + Fluent NHibernate + Castle.NHibernate.Integration
- 16. Apache HTTP Filter/Logging
- 17. Gradle Logging Output Levels
- 18. Xdebug或ZendDebugger&Logging
- 19. Selenium Webdriver Logging
- 20. Crashlytics Logging NSError
- 21. MVC Trace.TraceInformation logging
- 22. 问题logging arraylist
- 23. JDK Logging API
- 24. Strip Android NDK Logging
- 25. Spring Boot and Logging
- 26. Perf4j Not Logging Correctly
- 27. Rails Logging API
- 28. Akka Logging outside Actor
- 29. log4net not logging ThreadContext
- 30. Sinatra Logging&Stack Traces
谢谢!你是绝对正确的。我只是用反射器打开Castle.Services.Logging.Log4netIntegration DLL并确认你指出了什么。默认出厂配置并监视配置文件 - 包括app.config文件。我刚刚通过在运行时编辑我的log4net配置证明了它:)非常感谢! – 2010-12-06 16:37:04