Project Description
A simple but efficient logger for Windows Phone Application debug. You can use it to generate detailed log file in DEBUG mode and no need to remove these lines in your release code, because this logger will not exist in RELEASE mode.
Features
* Support 5 log levels: Trace, Debug, Info, Error, Fatal
* Exist only in DEBUG mode
* auto flush by specified interval
* Support background writting operations to avoid blocking the UI thread
* Singleton and thread-safe
Remarks
Logger is a simple but hard to be perfect facility for many applications in whatever programming language. You have to estimate the scenarios it will be used and do a lot of trade-offs. For example, in some case you hope every message is logged into persistent
storage immediately in order to locate the crashing point, while in other cases you output so many messages and hope frequent IO operations won't impact App's performance. In a word, you have to decide whether to buffer the log messages and when to put them
into file system case by case.
Based on these considerations, this logger is designed for general purpose as much as possible. You can decide whether and how to buffer the messages by setting the queue size from 1 to 1000, and whether run the writing operation in a standalone background
thread, and so on.
Enjoy.