An event log is a file used to record a timeline of events along with contextual metadata
Questions tagged [event-log]
1270 questions
5
votes
4 answers
How to get EventLog to record user name into Window Event Log?
I'm writing to the windows event log using C#. I can set every field visible in the mmc.exe "Computer Management" tool, except for the User field.
The client application is ASP.NET and uses forms authentication.
public static void WriteOnce()
{
…

MatthewMartin
- 32,326
- 33
- 105
- 164
5
votes
4 answers
EventLog WriteEntry does not write to designated log, but to Application log
I have an application where I want to write entries to event log
The logger is instantiated through MEF.
I created a derived class, to be able to perform the log initializations prior of using it.
My code is as below:
public class WinEventLog :…

bzamfir
- 4,698
- 10
- 54
- 89
5
votes
2 answers
What is the simplest way to query event logs for message contents in C#?
I'm interested in writing some code to query the Windows Event Log for specific error message contents, as described in this MSDN article. However, I'm not a big fan of the mechanic of basically hand-rolling XPATH or a custom event view in the…

Brandon Linton
- 4,373
- 5
- 42
- 63
5
votes
3 answers
Write to eventlog from within Sharepoint webpart
I'm trying to create a custom webpart. To implement error handling I would like to write to the eventlog. To do so, I'm trying to use the following code;
protected void btnExceptionTester_Click(object sender, EventArgs e)
{
try
…

Obelix
- 708
- 11
- 24
5
votes
2 answers
log4Net eventlog permissions issue using non-administrator account
This probably isnt an issue with SiteCore per se but I've included it for completeness. I have sitecore 6.3 running under IIS7 using a custom identity for the app pool. I cant get Sitecore to write its logging information (using the default…

chrislewisdev
- 556
- 1
- 7
- 21
5
votes
1 answer
Serilog EventLog Sink is not Logging
I've installed the Serilog.Sinks.EventLog sink into a little Background Worker Service project. However, none of the logs which I am attempting to write are showing up in the Event Log.
This is the body of my Main method. The RecurringTasks.Service…

onefootswill
- 3,707
- 6
- 47
- 101
5
votes
4 answers
Is there a New-EventLog equivalent in Powershell 7?
I've searched for every keyword I can find to see if there's a cmdlet in PS7 that is equivalent to New-EventLog from PS5?
Does something like this exist?

John Clement
- 81
- 1
- 6
5
votes
6 answers
How to identify users which are connected to a windows server via remote desktop
At my workplace, we have lab machines that we use to do our testing.
The standard procedure to reserve a machine for testing was to walk around the office to make sure that no one was using the machine.
This is highly inefficient and time…

Julien Nephtali
- 455
- 1
- 6
- 12
5
votes
3 answers
Windows: ReportEvent function
As far as I understood, the ReportEvent function requires Message Text Files associated through the registry to receive properly formatted messages. Is there any common Event Ids or any simple way to report an event with no Message Text Files…

Sergey Shandar
- 2,357
- 18
- 25
5
votes
1 answer
Creating an application and event logs in the "applications and services logs" section of the event viewer
I have a .NET application in which I want to write unhandled events to the event viewer. I noticed that there is a directory called "Applications and Services Logs". I would like to create an entry for my application in this directory and write any…

user70192
- 13,786
- 51
- 160
- 240
5
votes
1 answer
WIX: Create EventSource using .NET message file
I'm creating an installer for my application using WIX. Everything works fine so far. However, I'm trying to create a new event source during installation and that doesn't work as expected.
I've read and understood this question here on SO, but I…

Thorsten Dittmar
- 55,956
- 8
- 91
- 139
5
votes
3 answers
Mocking EventLog and EventLogEntry
I'm trying to write unit tests for an application that reports on Entries in an EventLog. Right now when I run the unit tests, I'm having to create a temporary EventLog, write entries to it, and delete the log when I'm done. I'm doing this because…

aubreyrhodes
- 777
- 4
- 16
5
votes
1 answer
EvtArchiveExportedLog fails with ERROR_DIRECTORY
I need to export some events from Windows Event Log to XML on Windows Server 2008 R2. To achieve it I export these events to a file using EvtExportLog and then try to use EvtArchiveExportedLog to get localized descriptions for events.
Here's the…

Michael
- 53,859
- 22
- 133
- 139
5
votes
1 answer
Error events 50000780 in Event Log on Azure, what do they mean?
In my Azure Web Site's Event Log I see same error every 1-5 minutes:
1 [varies]
5
50000780
What does this error message mean? Thank you in advance!

Alexander Shvetsov
- 639
- 5
- 16
5
votes
1 answer
Get-EventLog - valid message missing for some event log sources
I'm pulling and filtering System Event Log data using get-eventlog. What I'm finding is that get-event log is not able to correctly return the message associated with some entries. These entries appear normally in the event log viewer.…

andyb
- 2,722
- 1
- 18
- 17