Gayan,

Can't u implement the Evenlog in your next version to use the SystemLog on
the Platform runing or a special log file for Mono only.

Even now you can use the EventLog: You may hook the EntryWritten
event and write the log entry using syslog(3):

using System;
using System.Diagnostics;
using Mono.Unix.Native;

class Test
{
        static void Main ()
        {
                EventLog log = new EventLog();
                log.EnableRaisingEvents = true;
                log.EntryWritten +=
                        new EntryWrittenEventHandler (HandleEvent);
                log.WriteEntry ("Hello world!");
        }

        static void HandleEvent (object sender, EntryWrittenEventArgs e)
        {
                Syscall.syslog (SyslogFacility.LOG_USER,
                        SyslogLevel.LOG_WARNING,
                        e.Entry.Message);
        }
}


Rob

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to