Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有一种简单的方法可以在 ASP.Net MVC3 Azure Web 角色中跟踪或编写一些日志? 我只想写一些信息并查看日志文件是否已打印。 喜欢:WriteLine("Start Function A");
您需要一种在 Windows Azure 之外获取这些跟踪语句的方法,而 Windows Azure 处理此问题的方式是通过其诊断监视器。然后,所有跟踪都被路由到一个表 (WADLogsTable),然后您可以从角色实例本身或从 Windows Azure 之外运行的应用程序查询此表(通过执行 Linq 查询,可能是 Cerebrata 的诊断管理器等)。此表将汇总您所有角色实例的日志输出。
我的一位队友 Greg Oliver 最近写了一篇关于基础知识的博客。