[Mono-list] A robust, module-based GUI based logging solution for Mono.
Andy
andy at ninjagod.com
Sat May 16 09:57:43 EDT 2009
Hi,
I'm working on a summer of code project for MonoDevelop, and tend to write
extremely verbose code, which becomes a little hard to handle on
stdout/stderr, especially for large programs that make it easy to miss
critical things on stdout. I started writing a new logging solution, which
is centered around having multiple modules, fine grained control and
flexibility, and a GUI to top things off. I wanted to keep this confined to
my soc project, but I feel that the community might benefit from my idea(if
there isn'ta better one out ther), so I thought of metioning it here.
I've written a project called "PowerLogger", a C# project on monodevelop. I
have written a basic implementation and will be uploading on github as soon
as some bugs are fixed.
The API is written in two classes: LoggerWindow, and LoggerInterface.
A single LoggerWindow object is created, and initialized for the whole
application. It has a treeview, a textview and some other options . It runs
on it's own thread
A loggerInterface is created for a class, which wants to log. I have a
screenshot with a very early build of the tool running in the top right
corner of the screen.
http://img200.imageshack.us/img200/2765/logger2.png
I'll give an example of the current api:
LoggerInterface logger = new LoggerInterface(loggerWindow, "Module Name");
// the loggerwindow object must be declared
logger.INFO("The value of my object is: ", content); // content can be any
object. We use the C# reflection to generate a JSON representation of the
object.
// we can also use DEBUG, ERROR, etc.
The main advantage is each module is represented on the tree, and each gets
it's own log. So I can create multiple modules, and by double clicking on a
tree object, I can see that module's log - no poring through stdout, or
stderr to find what's relevant :)
also, I've added some elementary functionality to pause, change verbosity,
save, redirect, etc.
If you have any suggestions, questions, or if you know such a project which
exists like this, please let me know. I'm very very new to C#.
Thanks,
Andy
--
Anirudh Sanjeev
Fourth Year Undergrad - Indian Institute of Technology Kharagpur
http://anirudhsanjeev.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20090516/9e873dff/attachment.html
More information about the Mono-list
mailing list