custom-eventlog

How do I write to a custom Windows event log?

I'm attempting to set up basic logging to the windows event log in .net via System.Diagnostics.EventLog, but I'm failing to see any events actually getting written to the log. Consider the following code: // Elsewhere in the class private static readonly string EventLogName = "LogName"; private static readonly string EventLogSource = "...

Custom event logging for Javascript frameworks

Imagine I have a web application with nice components coded up with your favorite Javascript library. I make heavy use of custom events to reduce the dependencies between these components so you can easily place them in multiple contexts, repeat them on the page, and/or nest them as I see fit. This is a lovely picture, but debugging can...

Setting maximum event log size

Why is the following code not working? if(EventLog.Exists("Foo")) { EventLog.Delete("Foo"); } if(EventLog.Exists("Foo") == false) { EventLog.CreateEventSource("Foo", "Foo"); EventLog.GetEventLogs().First(x => x.Log == "Foo").ModifyOverflowPolicy(OverflowAction.OverwriteAsNeeded, 0); EventLog.GetEventLogs().First(x ...

Cannot open log for source {0} on Windows 2003 Server

I am having a huge problem with the eventlog on my server. Right let me first of all explain the setup. I have a domain setup with 2 computers One computer is running IIS the other is a workstation. The IIS is running Win2k3 the workstation Win XP. The IIS computer is hosting a website which uses Windows Impersonation and tries to log ...