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