[Mono-dev] local file based EventLog implementation

Atsushi Eno atsushi at ximian.com
Sun Aug 6 21:58:19 EDT 2006


Hi,

During a consultation with a local customer I recently noticed that
we don't have EventLog implementation, while a basic framework has
existed for years, which was intended to have some different
implementations. Hence I implemented pretty simple stupid one, which
works only for local machine.

I modified some of existing framework as it does not seem to support
multiple implementation in reality.

To use this code, set MONO_LOCAL_EVENTLOG_DIR = /path/to/yourfavoritedir
to point the location for aggregated event logs.

The usage sample I have is like:

	EventLog log = new EventLog ("enolog", ".", "logg");
	Console.WriteLine (log.Log);
	foreach (EventLogEntry e in log.Entries)
		Console.WriteLine (e.Message);
	log.WriteEntry ("My test message.");

It is really a hack. Any improvements or suggestions would be
appreciated. If no one is taking care of EventLog stuff, I'll
checkin the code by myself.

Atsushi Eno

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: eventlog-impl.patch
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060807/1d41426c/attachment.pl 


More information about the Mono-devel-list mailing list