重定向AppFabric日志记录 [英] Redirecting AppFabric Logging
问题描述
您好..有没有办法将AppFabric日志记录重定向到自定义文本日志文件,该文件将与我的应用程序日志集成。更好的是,而不是完全重定向,我宁愿只是听,所以我可以将日志数据的副本写入我的自定义
日志。
Hello.. Is there a way to redirect AppFabric logging to a custom text log file which will be integrated with my application logs. Better still instead of a complete redirecting, i would rather just listen so i can write a copy of the log data to my custom log.
推荐答案
AppFabric监视的运行时(WCF和WF)向ETW发出事件(Windows事件跟踪)
http://msdn.microsoft.com/en-us/library/bb968803(VS.85).aspx 。
你可以创建与程序logman的ETW会话( http://technet.microsoft.com/en-us/library/bb490956 .aspx )。
You can create ETW sessions with the program logman (http://technet.microsoft.com/en-us/library/bb490956.aspx).
您可以配置会话以将事件写入文件或实时。
You can configure sessions to write the events to a file or to be realtime.
您可以以编程方式阅读使用System.Diagnostics.Eventing.Reader API的事件( http:// msdn .microsoft.com / zh-CN / library / system.diagnostics.eventing.reader.aspx )。
You can programatically read the events using the System.Diagnostics.Eventing.Reader APIs (http://msdn.microsoft.com/en-us/library/system.diagnostics.eventing.reader.aspx).
希望这会有所帮助。谢谢,
Hope this helps. Thanks,
Adam
这篇关于重定向AppFabric日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!