有没有办法让 Log4net 在 Windows Phone 7 上工作?

发布于 2024-10-09 09:27:47 字数 109 浏览 0 评论 0原文

我是 Apache Log4Net 的忠实粉丝,并且一直在使用它。我对将这种日志记录功能引入 Windows Phone 7 感到不知所措。

您/您能做到这一点吗?

如何?

I'm a huge fan of the Apache Log4Net, and have been using it forever. I'm at a loss bringing this logging power to Windows Phone 7.

Have you / Can you accomplish this?

How?

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

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

发布评论

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

评论(4

洛阳烟雨空心柳 2024-10-16 09:27:47

如果有 Log4Net 的 Silverlight 版本,那么它应该能够在 Windows Phone 7 上工作。您必须记住,鉴于底层环境是 Silverlight,Windows Phone 7 上的 100% 网络 I/O 将是异步的,因此,除非使用 Begin/End Response 方法,否则任何记录到远程服务器的标准调用都将不起作用。

If there's a Silverlight version of Log4Net then that should be able to work on Windows Phone 7. You have to keep in mind that 100% of your network I/O off of Windows Phone 7 will be asynchronous given that the underlying environment is Silverlight, so any of the standard calls for logging to a remote server won't work unless they use the Begin/End Response methods.

凉风有信 2024-10-16 09:27:47

这是最近发布的,您可能想将其作为起点。

Silverlight 和 WP7 异常处理和日志记录构建块

This was released recently that you might like to check out as a starting point.

Silverlight and WP7 Exception Handling and Logging building block

瀟灑尐姊 2024-10-16 09:27:47

这对于 Silverlight 分析框架 (http://msaf.codeplex.com/) 来说可能是一个很好的用途。

这只是一个猜测,因为我今晚开始将 MSAF 放入应用程序中。我知道您可以在 Google Analytics 中记录自定义条目(尽管我忘记了正确的术语),并希望 MSAF 也提供该功能。

This may be a good use for the Silverlight Analytics Framework (http://msaf.codeplex.com/).

Just a guess at this point since I'm starting to put MSAF in an app tonight. I know you can log custom entries in Google Analytics (although I forget the proper term) and hoping MSAF provides that functionality as well.

述情 2024-10-16 09:27:47

这对 log4net 没有帮助,但是你考虑过 NLog 吗? NLog 2.0 已推出测试版并且与 Silverlight 兼容。

http://nlog-project.org/

NLog 2.0 还支持异步日志记录。

我没有做过任何WP7开发,所以我真的不知道在该环境下登录还有什么其他注意事项。

更新:NLog 最近宣布推出 Windows Phone 测试版7.

祝你好运。

This doesn't help with log4net, but have you considered NLog? NLog 2.0 is out in beta and is compatible with Silverlight.

http://nlog-project.org/

NLog 2.0 also supports asynchronous logging.

I have not done any WP7 development, so I don't really know what other considerations there are for logging in that environment.

Update: NLog recently announced a beta release for Windows Phone 7.

Good luck.

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