跨多个域的诊断.Trace

发布于 2024-12-05 17:21:21 字数 188 浏览 4 评论 0 原文

我没有找到有关 Trace 和 TraceListener 如何跨多个域工作的信息。

Trace.WriteLine 的调用是否跨多个域使用相同的实例,还是在每个域上创建自己的 Trace 类实例?

换句话说..我可以在多线程或多域应用程序中使用 Trace.Write 并且不关心潜在的同步问题:从不同域写入同一文件的竞争等?

I didn't find information about how Trace and TraceListener work across multiple domains.

Does the calling of Trace.WriteLine use the same instance across multiple domains or it creates its own Trace class instance on each domain?

In other words..can i use Trace.Write in multi-threaded or multi-domain app and don't care about potential synch problems: races in writing to the same file from different domains e.t.c?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

汐鸠 2024-12-12 17:21:21

每个 appDomain 使用自己的静态类实例,因此我无法跨多个域使用 Trace.Write。

Each appDomain uses own instance of static class therefore i am can't use Trace.Write across multiple domains.

微凉 2024-12-12 17:21:21

我发现了这篇不错的文章,它可能会提出前进的方向:

http://philsversion.com/2009/05/14/how-to-use-debugwrite-and-tracewrite-across-app-domain-boundries/

全部归功于原作者。

I came across this nice post which may suggest a way forward:

http://philsversion.com/2009/05/14/how-to-use-debugwrite-and-tracewrite-across-app-domain-boundries/

All credit to the original author.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文