Questions tagged [readeventlog]
20 questions
4
votes
2 answers
How to read the Windows Event Log without an EventMessageFile?
I have code that reads the Windows Event Log. It uses OpenEventLog, ReadEventLog and gets the event source and event ID. Then it looks up the source under the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application
key, loads…

DougN
- 4,407
- 11
- 56
- 81
3
votes
3 answers
Uniquely identifying an Event Log entry in C#
By way of background I am trying to consolidate windows security event log entries from a number of machines into a single SQL Table so I can report on them. This all works in C#.
But I need a way to more efficiently determine if I have seen this…

chrismor
- 81
- 5
3
votes
1 answer
How can I query the Eventdata using a EventLogQuery?
Im trying to determine a machines most frequent user by looking at the security event logs. im looking at using the 4624 Event ID but I cant seem to work out how to add anything from the EventData in the query. I can get the standard data from a…

Will Smith
- 33
- 1
- 3
3
votes
3 answers
Logging Search Results in a Rails Application
We're interested in logging and computing the number of times an item comes up in search or on a list page. With 50k unique visitors a day, we're expecting we could produce 3-4 million 'impressions' per day, which isn't a terribly high amount, but…

Mark Swardstrom
- 17,217
- 6
- 62
- 70
1
vote
0 answers
Cannot get EventRecord.FormatDescription(IEnumerable
I am trying to call FormatDescription(ienumerable) of an EventRecord but cannot get it to replace the strings. What am I doing wrong?
public void StartLogReading()
{
EventLogQuery evtLogQuery = new EventLogQuery(
…

Pelle
- 105
- 7
1
vote
2 answers
And/Or XPath query to select some Event Log records
I have googled lots of possible answers with no luck. I am trying to extract the following from the Event Log (pseudo-code):
select events
where
event date/time between FromDateTime and ToDateTime
and
((Level<=2) // error, critical only
…

Kim Crosser
- 413
- 8
- 13
1
vote
1 answer
Reading windows event log using win32evtlog module
Below is the code, It's giving the total 87399 number of the log, but when reading the logs it only returns a 7 record list.
import win32evtlog
server = 'localhost'
logtype = 'Application'
hand = win32evtlog.OpenEventLog(server,logtype)
flags =…

Girish Ingle
- 130
- 1
- 2
- 10
1
vote
1 answer
EventLogReader filter EventLogQuery by created TimeDate
My current problem is, that I don't know the syntax of those Eventlogqueries. I want a query that gives me all the Events of the past one Week
private Result
- > GetEvents()
{
var eventList = new…

Sokui
- 53
- 1
- 10
1
vote
1 answer
Reading local event log?
Here i am trying to read the local system event log using c# using this code-
string eventLogText = "";
try
{
var eventLog = new EventLog("logname", "machinename");
foreach (var entry in eventLog.Entries)
…

Garbage Collector
- 41
- 1
- 5
0
votes
1 answer
Reading Windows event logs of the last one hour using win32evtlog module
Reading windows event log using win32evtlog module
that post explains how one can read the entire log of events but I was wondering how one can actually use that module to get logs of the last hour?

Bhaulik
- 21
- 5
0
votes
1 answer
How to find total rows affected when using EventLogReader (eventLogQuery)?
I'm trying to read eventlogs from a server which has about 100 000 records using class EventLogReader(eventLogQuery).
I'm using pagination and each page will show only 25 records in my screen. So, I will be reading 25 records out of total records…
0
votes
1 answer
Why Does My Vector Mysteriously Get Cleared?
I am making a program that reads and stores data from Windows EventLog files (.evt) in C++. I am using the calls OpenBackupEventLog(ServerName, FileName) and ReadEventLog(...). Also using this: PEVENTLOGRECORD
Anyway, without supplying all of the…

Eric
- 2,098
- 4
- 30
- 44
0
votes
0 answers
Trying to read event log, trying to fix the exception 'Unable to read beyond end of the stream.'
I am trying to read an event log file, but each time it attempts to read any file it puts out the exception 'Unable to read beyond end of the stream.'
I can't figure out how to fix what is calling the exception.
This is the specific line that is…
0
votes
0 answers
I am trying to read an event log file, it is bringing up Invalid File Format, but the format is what I want to read
I am trying to read an event log file, I am able to send the file into the code, however for the file I am trying to read, located
"C:\Users\banvilb\Documents\Event Log\Test\BSN_Navigator.evt",
is bringing up "Invalid File Format"
The if statement…
0
votes
1 answer
C# | Receiving CS0236 Error: A field initializer cannot reference the non-static field, method, or property 'getInfo.BSN_Navigator'
I am trying to read an event log from my local computer using the EventLogReader and EventRecord classes. Using C#.
I keep getting the error
CS0236 Error: A field initializer cannot reference the non-static field, method, or property…