Questions tagged [event-log]

An event log is a file used to record a timeline of events along with contextual metadata

1270 questions
0
votes
1 answer

Writing to the Windows Security Log with C++

I have been tasked with writing entries to the Windows security log. The entire project is Win32 C++ code. I have already written (with help from various online resources) a logging class that handles registration, deregistration, and code for…
REW
  • 752
  • 2
  • 9
  • 27
0
votes
2 answers

Insert all Internal Server Errors into windows event log

I have developed a small WCF service which handles HTTP request. I want to be aware of every fault that happens: everything that causes 500 Internal Server Error from the contracts view everything that causes a CommunicationException from the…
Etan
  • 17,014
  • 17
  • 89
  • 148
0
votes
3 answers

Write to Event Log Windows Scheduled Task

I have a console app that will be running through a scheduled task and what i'd like to do is have it write to an Event Log in a catch block. I've tried using EventLog.WriteEntry("My App Name","Error Message - " ex.ToString() ); but for some…
zSynopsis
  • 4,854
  • 21
  • 69
  • 106
0
votes
2 answers

What's the difference between using EventLog .NET type and having eventLog registry entry?

Using System.Diagnostics.EventLog .NET type one can programmatically create logs into the Event Viewer application. Does anybody knows about "HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\XXX\" registry entry? Who uses this assembly…
dattebayo
  • 2,012
  • 4
  • 30
  • 40
0
votes
1 answer

Homemade Google Analytics

Since Google analytics can raise many privacy concerns, I implemented an events logger. My first idea is to track user's generated events into a logfile and then send them back to the server that will perform the analysis of data for the System…
2dvisio
  • 861
  • 2
  • 10
  • 29
0
votes
1 answer

How to catch event log clearing attempt?

Is it possible somehow to catch attempt to clean the event log? So that I can cancel that attempt or make an archive and only then allow to clear the log. Or if it's not possible to catch such event, maybe there are other ways to force user to make…
westwood
  • 1,774
  • 15
  • 29
0
votes
1 answer

Missing Event Viewer descriptions

I am creating an new installation package for one of our products and I'm having significant trouble getting the event message description DLL to be used by Windows to provide event descriptions to the Event Viewer. I always get the following…
takesides
  • 127
  • 1
  • 1
  • 10
0
votes
1 answer

Using Enterprise Library to log to a custom Windows event log does not work

I have configured the Enterprise Library 5.0.505 Logging Application Block to log events from my .NET 4 application to a custom windows event log. 'Custom' meaning that the log is application-specific and shows up as an entry under the "Applications…
Stephen Hewlett
  • 2,415
  • 1
  • 18
  • 31
0
votes
1 answer

Filtering event log entries returned from remote machine

I'm trying to return event log entries written by sqlserveragent. Unfortunately, I can only seem to grab all the entries at once and that takes too long. Here is the code I'm currently using: EventLog log = new EventLog("Application", "x.x.x.x",…
Brandon Moore
  • 8,590
  • 15
  • 65
  • 120
0
votes
2 answers

Exceptions, Global.asax, and the eventlog

I would like to log unhandled exceptions from the global.asax to the Application eventlog. However, I've noticed that IIS is already logging these unhandled exceptions as warnings. Is there a way to suppress these messages since I'm planning on…
tribus
  • 1,110
  • 1
  • 9
  • 27
0
votes
2 answers

Creating new event log source

My application calls a library (which I do not have control) that creates a new EventLog source and uses EventLog.SourceExists. It throws System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. …
Sam
  • 933
  • 5
  • 14
  • 26
0
votes
1 answer

Reading Windows Event Payload Including Complex Data

In my previous question here I posted the xml I am trying to serialize. Here is another XML example:
Saher Ahwal
  • 9,015
  • 32
  • 84
  • 152
0
votes
2 answers

Elevate user to Admin level to write to Eventlog in .NET

I am working on a Windows .NET application and I want to write to the Eventlog. Public Shared Sub WriteExceptionToEventLog(ByVal message As String) Dim cs As String = "TESTLOG" Dim elog As New EventLog() Dim sourceExist As…
smashstar
  • 81
  • 1
  • 16
0
votes
1 answer

Get the location of windows event log files

We are using EventLog to log exceptions. there is a background thread which check once the eventlog get full and programmaticaly transfers the entries into an XML file and then clear the event log. This works fine but it seems like there is too much…
Mithir
  • 2,355
  • 2
  • 25
  • 37
0
votes
1 answer

How can I solve a TypeInitialization exception in my app when deployed?

My app runs fine on my machine (of course/famous last words). However, when deploying it to another machine on the network, it won't even start up. I ran my EventLog utility on that machine and it told me this: Type:Error Source: .NET Runtime Time…