Azure Development Fabric中的RoleManager.WriteToLog [英] RoleManager.WriteToLog in Azure Development Fabric

查看:55
本文介绍了Azure Development Fabric中的RoleManager.WriteToLog的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是迈出了使用Azure的第一步,在开发结构中看到的第一件事是一堆控制台样式日志记录窗口.因此,我认为这将很方便,并决定弄清楚如何在此处编写内容并偶然发现:

I'm just taking my first steps with Azure and the first thing I see in the development fabric is a bunch of console style logging windows. So I figure that's going to be handy and decide to figure out how to write stuff there and stumble upon this:

Microsoft.ServiceHosting.ServiceRuntime.RoleManager.WriteToLog("Information", "Message);

很酷,但我在日志中什么都看不到.在首次安装后看到某个地方的帖子,您需要先重新启动它,然后它才能起作用,因此我尝试了此操作,但仍然没有任何帮助.

Cool, except I don't see anything in the log. Saw a post somewhere that after first install you need to reboot before this will work, so I tried that but still nothing.

我已经检查了代码正在执行的断点,并且已经检查了开发结构中的日志记录级别.

I've checked with a break point that the code is executing and I've checked the logging level in the dev fabric.

这应该可行吗,还是我完全脱离基地了?

Is this supposed to work, or am I completely off base?

只需添加有关我在做什么的更多信息:

Just to add some more information about what I'm doing:

  • 从VS08针对云服务的新项目向导开始
  • 在向导中添加了一个ASP.NET Web角色项目
  • 在Default.aspx.cs的Page_Load方法中,添加了上面显示的WriteToLog行
  • 运行该项目,并在dev fabric用户界面中,将树深入到Web角色实例"0"
  • 显示的日志中没有任何内容,除了一些角色实例启动消息,然后是一堆健康状态消息.
  • 尝试几次重新加载页面,Page_Load中的断点被命中,但日志中没有.
  • 日志记录级别"设置为信息,而其他事件则是级别信息,因此我认为这不是日志记录级别的问题.

推荐答案

经过更多的谷歌搜索后,这似乎是一个已知问题:

After some more googling, seems like this is a known issue:

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=481184

这篇关于Azure Development Fabric中的RoleManager.WriteToLog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆