Silverlight Logging framework and/or best practices

前端 未结 6 1246
谎友^
谎友^ 2020-12-05 02:37

Now that Silverlight 2 has finally shipped. I\'m wondering if anyone has put together any logging frameworks for it, maybe something like enterprise library logging or log4n

6条回答
  •  萌比男神i
    2020-12-05 03:22

    I am about to delve into something similar myself for a product we've written. I'm considering using PostSharp for Silverlight to add client-side logging as an aspect.

    I have used the NLog project with great success before under the full .NET Framework and the Compact Framework so I'll most likely take the existing framework code and add some logging targets:

    • A standard System.Diagnostics target to enable capturing using DebugView, etc.
    • An asynchronous Web service target similar to the one in NLog.
    • An isolated storage target with deferred transfer to server semantics.

    I've briefly looked at Clog and it seems to suffer from one major flaw - it can't log a connection failure. So assuming your Web server is online all the time, yes it will work, but when problems occur upstream or on the server itself, the logging data is all lost and might even crash your application.

提交回复
热议问题