An event log is a file used to record a timeline of events along with contextual metadata
Questions tagged [event-log]
1270 questions
9
votes
2 answers
Application Event log exceeding maximum allowed count
Somehow, the Application Event log count ended up to 18,446,744,073,709,551,499. This causes MMC snap-in to fail when I want to see the event using Event Viewer, giving a System.OverflowException (Value was either too large or too small for an…

misha
- 2,760
- 3
- 28
- 30
9
votes
6 answers
Writing to event log in C# - do I need to use EventLog.CreateEventSource when writing to Application log?
When I use the following code to write to Application Event log, everything works fine:
EventLog log = new EventLog();
log.Source = "Application";
log.WriteEntry("test message", EventLogEntryType.Error);
When I use the code that is from MSDN and…

sarsnake
- 26,667
- 58
- 180
- 286
9
votes
1 answer
Create EventLog source in WiX without an event message file
I've seen a few questions here and there about creating event log sources using WiX. What puzzles me is why util:EventSource/@EventMessageFile is required. It's annoying having to specify it when you don't need a message file to write event log…

anton.burger
- 5,637
- 32
- 48
9
votes
1 answer
Logging LogLevel-Information not showing in Windows event log
I ran into some problems with logging **Information** Logs to Windows event log.
Starting from a blank ASP.NET Core-Web-API .Net 5
I edited the following to Program.cs
public static IHostBuilder CreateHostBuilder(string[] args)…

Paul Pascher
- 317
- 2
- 14
9
votes
2 answers
Detect manual time change and daylight savings time events in windows events log
I would like to detect during my C# application run-time a manual change of the system time and date and automatic daylight savings time change.
Moreover I am looking for a way to detect these changes that happened during the time the application…

Oren
- 91
- 1
- 2
9
votes
2 answers
Windows Event IDs
Is there a specific range of Event IDs in Windows reserved for application developers?
I'm working on a .Net application that will write errors to the windows event log. This application actually targets servers, and will be run as a scheduled task…

Joel Coehoorn
- 399,467
- 113
- 570
- 794
9
votes
3 answers
add event log to registry
I'm attempting to access a 'ForwardedEvents' events log on a server using
el = new EventLog("ForwardedEvents", serverName);
this isn't working.
I believe it's not working because the log isn't contained in the registry where Eventlog would expect…

AA11oAKas
- 809
- 1
- 11
- 23
9
votes
3 answers
Security exception when writting to an EventLog from an ASP.NET MVC application
I have a library that I created with some business logic that includes writing to a System.Diagnostics.EventLog instance. The library is normally called from a Windows Service application, but now I'm trying to call those same library functions from…

CoderDennis
- 13,642
- 9
- 69
- 105
9
votes
2 answers
Is it acceptable to write to the Application Event Source?
There are certain circumstances in our application where non-fatal errors occur and the application recovers.
An example of this failing to correctly identify some importable items when populating said items to a selection list. The errors won't…

MoSlo
- 2,780
- 4
- 33
- 37
9
votes
2 answers
How to write event log category
As we know, we can use the class EventLog to write event logs, but I am confused about how to write category name in my event log. Thoug it provides the category parameter, for example, one of the type of WriteEntry is:
public void…

Xiaodan Mao
- 1,648
- 2
- 17
- 30
8
votes
1 answer
EventLogQuery reader for remote computer?
I'm using this code to readmy own event Log from my win7 Computer.
EventLogQuery eventsQuery = new EventLogQuery("Security", PathType.LogName, queryString);
eventsQuery.ReverseDirection = true;
EventLogReader logReader = new…

Royi Namir
- 144,742
- 138
- 468
- 792
8
votes
4 answers
Simple way to backup event log on Windows Server
Is it possibile to create a simple way to backup the event log, with such as a batch file or a simple app ?
I need to make it working on a customer's site, where the reference is an non-expert user.
Thanks

dancerjude
- 111
- 1
- 1
- 10
8
votes
1 answer
Windows callback function in Golang
I wanna make push subscription to Windows Event Log in Golang
How exactly should I pass a callback function?
EVT_SUBSCRIBE_CALLBACK is the pointer of function, like
typedef DWORD ( WINAPI *EVT_SUBSCRIBE_CALLBACK)(
EVT_SUBSCRIBE_NOTIFY_ACTION…

ubombi
- 1,115
- 2
- 15
- 30
8
votes
1 answer
How to write an event log entry with structured XML data?
Question: How to write an event log entry with structured XML data using PowerShell?
My PowerShell script writes to the Windows event log using the Write-EventLog cmdlet. Currently I use the -Message parameter to set the event log…

D.R.
- 20,268
- 21
- 102
- 205
8
votes
0 answers
Using "Microsoft Windows Security Auditing" provider in real-time consumer with ETW (Event Tracing for Windows)
My task is to make an ETW real-time consumer with events provided by 'Microsoft Windows Security Auditing'.
I made a simple controller and consumer application, basing on this example…
user4410709