Questions tagged [event-log]

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

1270 questions
16
votes
1 answer

EventLogReader and EventRecord: Where's the Message?

I want to query the Application Event Log on a remote machine and I resorted to using the EventLogReader rather than the EventLog because it takes way to long to find the events I need with the EventLog. However, even though it finds the events…
Brandon Moore
  • 8,590
  • 15
  • 65
  • 120
16
votes
4 answers

Read Specific Windows Event Log Event

I am working on a program and need ot know how I would read a specific entry to the Windows Event Log based on a Record number, which this script will already have. Below is the code I have been working with, but I don't want to loop through all of…
Zac Brown
  • 5,905
  • 19
  • 59
  • 107
15
votes
2 answers

Why use ETW over EventLog and vice versa?

Why should I use Event Tracing for Windows (ETW) over the standard .NET EventLog class, and vice versa? Does knowing that we'll be using quite a few performance counters impact the decision? What I know so far: ETW should perform much better. ETW…
Kaleb Pederson
  • 45,767
  • 19
  • 102
  • 147
15
votes
2 answers

Does one need to manually create a Windows event log source when installing a Windows service

I have developed a Windows service in C#. I have created a installer with Visual Studio 2008, which installs the Windows service. Everything is good so far. I want to make sure that the event source has been created at install time, so that any…
Elan
  • 6,084
  • 12
  • 64
  • 84
15
votes
1 answer

How to create a .NET event log source using WiX

This is an intentional semi-duplicate of How do you create an event log source using WiX and WIX: Create EventSource using .NET message file. My first question is, does it really have to be so complicated? Isn't there some way to simply specify to…
RenniePet
  • 11,420
  • 7
  • 80
  • 106
15
votes
4 answers

Does anyone know what the output from getevent means?

I'm trying to figure out what format the output is from the getevent command in the adb shell. For example, the output looks like this: adb shell getevent -t | grep event1 The -t flag provides a timestap and the grep is to filter the messages to…
pypmannetjies
  • 25,734
  • 7
  • 39
  • 49
14
votes
1 answer

How to interpret windows APPCRASH mysterious log?

How should I interpret these logs to identify the cause of the appcrash? Fault bucket , type 0 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: InsightAnalysisEngine.exe P2: 1.0.0.0 P3: 4f4dee84 P4: KERNELBASE.dll P5:…
Nawaz
  • 353,942
  • 115
  • 666
  • 851
14
votes
9 answers

What is the Fastest way to read event log on remote machine?

I am working on an application which reads eventlogs(Application) from remote machines. I am making use of EventLog class in .net and then iterating on the Log entries but this is very slow. In some cases, some machines have 40000+ log entries and…
Kapil
  • 9,469
  • 10
  • 40
  • 53
14
votes
1 answer

NLog: can't write to event log

I can't write to the event log with NLog. I've been able to write to the console and to a file. I've turned on exceptions in NLog and am receiving no feedback from NLog. Here is my NLog.config:
sparks
  • 1,264
  • 1
  • 15
  • 29
13
votes
2 answers

Error while writing to event log, prevents windows service from starting?

I am using the following code to create a custom event log in my windows service application: public ServiceConstructor() { InitializeComponent(); if (!EventLog.SourceExists("WinService")) { EventLog.CreateEventSource("WinService",…
Harun
  • 5,109
  • 4
  • 38
  • 60
12
votes
3 answers

C# EventLog Inaccessible Log

Below is an exception I encountered while running the immediately following code: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security. The code is if…
DigitalJedi805
  • 1,486
  • 4
  • 16
  • 41
12
votes
1 answer

Where is the application dump created by Environment.FailFast() located on the disk?

I am trying to use Environment.FailFast() in my application. The MSDN documentation says that it creates an application dump during application termination. The FailFast method writes the message string to the Windows Application event log,…
Ganesh R.
  • 4,337
  • 3
  • 30
  • 46
12
votes
2 answers

Use EventLogReader in Desc order mode?

Im using in EventLogQuery eventsQuery = new EventLogQuery("Security", PathType.LogName, queryString); EventLogReader logReader = new EventLogReader(eventsQuery); In order to read the log events. I need to find the latest usage of event number…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792
12
votes
3 answers

Which approach is better to read Windows Event log in C#? WMI or EventLog

I need to write an application to grab event log for System/Applications. The other requirement is that I need to read event log every minute or so to grab the new event logs since I read last time. Currently I am considering to use C# to implement…
istudy0
  • 1,313
  • 5
  • 14
  • 22
12
votes
1 answer

HealthMonitoring Failure Audits Repercussions in ASP.NET

Our event viewer shows two information-level messages that we want to omit from the event logs: When a user fails authentication (Event code: 4006 Event message: Membership credential verification failed.) When forms authentication has expired and…
1 2
3
84 85