使用远程桌面时,我在哪里可以找到我的non-.NET角色的日志? [英] Where do I find my non-.NET role's logs when using Remote Desktop?

查看:171
本文介绍了使用远程桌面时,我在哪里可以找到我的non-.NET角色的日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是non-.NET工作者的作用,通过设置的在服务定义ProgramEntryPoint 。这意味着,有否.NET code中的 = nofollow的>我的应用程序,这是写在Java和Python。

I'm using a non-.NET worker role, configured by setting the ProgramEntryPoint in the service definition. That means that there is no .NET code in my application, which is written in Java and Python.

当我在本地运行我的工人角色,我可以打开Windows Azure计算仿真器应用程序,看看我的工作进程的标准输出和错误。

When I run my worker role locally, I can open the Windows Azure Compute Emulator application and look at the standard output and error of my worker process.

在我的远程桌面到我的Azure实例中,我不知道从哪里得到了相同的信息。在哪里可以找到标准输出和错误?

When I remote desktop into my Azure instance, I don't know where to get that same information. Where do I find standard output and error?

推荐答案

要直接回答上面的问题:

To directly answer the question above:

<ProgramEntryPoint commandLine="run.bat >> app.log 2>&amp;1" ... "/>

当你运行上面计算模拟器的命令,你问重定向命令shell输出到run.bat中位于同一位置。而已。当您在计算模拟器启动您工作者的角色,它是由CSX文件夹中的位置开始并创建那里app.log。

When you run above command in compute emulator, you are asking to redirect the command shell output to the same location where run.bat is located. That's it. When you launch your worker role in compute emulator, it is started from the location inside CSX folder and the app.log is created there.

现在如果你采取完全相同的code和部署Windows Azure上,所以当的run.bat >> app.log将被执行时,app.log文件将在同一创建直接在您的run.bat中的位置。您可以于网上找到它:\\为approot \\后,您的RDP您的Azure实例

Now if you take the exact same code and deploy on Windows Azure, so when "run.bat >> app.log" will be executed, the app.log file will be created in the same directly where your run.bat is located. You can find it at E:\Approot\ after your RDP your Azure instance.

以上方法是正确的,但战略的不对。这是因为:

Above method is correct but the strategy is NOT RIGHT. This is because:


  1. 日志中的Azure虚拟机将无法坚持的Azure虚拟机回收

  2. 您将需要RDP到Azure的虚拟机来检查,(如果你有100个实例,你愿意吗RDP给每一位获取该日志?)

最好的策略是,如果这是由第三方应用程序创建这些自定义日志,直接传送到Azure存储。

The best strategy would be if these custom logs which are created by 3rd party applications, are transferred directly to Azure Storage.

在那里有自定义应用程序的java.exe即,php.exe的,蟒蛇等任何情况下,我建议直接在本地存储文件夹中创建日志文件,然后初始化Worker角色Azure诊断(WorkerRole.cs)这些自定义日志文件直接从Azure的VM导出到您的Azure Blob存储。

In any scenario where there is custom application i.e. java.exe, php.exe, python etc, I suggest to create the log file directly at "Local Storage" Folder and then initialize Azure Diagnostics in Worker Role (WorkerRole.cs) to export these custom log files directly from Azure VM to your Azure Blob storage.

如何在描述本地存储创建自定义日志这里

How to create custom logs on local storage is described here

这篇关于使用远程桌面时,我在哪里可以找到我的non-.NET角色的日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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