[Mono-dev] Event logging under Mono
alex.koeplinger at outlook.com
Mon Dec 8 23:03:22 UTC 2014
I'd just use a proper logging framework like NLog (http://nlog-project.org/) instead of using the rather Windows-specific event log implementation.
From: spyros at microsoft.com
To: mono-devel-list at lists.ximian.com
Date: Mon, 8 Dec 2014 22:38:26 +0000
Subject: [Mono-dev] Event logging under Mono
[Sorry if duplicate. I think I originally sent to wrong alias]
I am trying to implement logging for a small application running under Mono on a Raspberry Pi. Unfortunately I have been unable to create an event log despite following guidance that I have found on the Net,
and am wondering if there is best practice on how to do this. FWIW, the steps I have taken are as follows:
On the Raspberry Pi, I created /var/lib/mono and /var/lib/mono/eventlog directories, set directory permission on each to 777 per
Ran the following .NET code, based loosely on
static void Main(string args)
Console.WriteLine("Exiting, execute the application a second time to use the source.");
Console.WriteLine("Found the EventLog Source.");
If I run this twice on a Windows 8 machine, the first time it comes back with “CreatedEventSource”, the second time it comes back with “Found the EventLog Source”, and the Windows Event Log has a new log entitled
MyNewLog. However, if I run it on the Raspberry Pi under mono, I get the message “CreatedEventSource” no matter how many times I run it, and no files are created in /var/lib/mono/eventlog.
What am I missing, or what should I try instead?
Microsoft Open Technologies, Inc.
spyros at microsoft.com
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list