Has anyone written an event log that uses Isolated Storage in Silverlight 3? Any suggestions on implementing one?
Specific questions:
- Should I keep a stream writer open, or should I open,write, and close for each entry?
- How should I remove items from the log atomically?
Crypto Logger supports Silverlight apps and libraries and it can log to its UI console via TCP, to isolated storage and also to the Browser Console (like Firebug in FireFox) or the in-built one in IE8.
From the MSDN article on IsolatedStorageSettings and IsolatedStorageFile
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
来源:https://stackoverflow.com/questions/1579260/silverlight-event-log-in-isolated-storage