Questions tagged [event-log]
An event log is a file used to record a timeline of events along with contextual metadata
1,227
questions
197votes
5answers
258kviews
Write to Windows Application Event Log
Is there a way to write to this event log:
Or at least, some other Windows default log, where I don't have to register an event source?
193votes
23answers
326kviews
System.Security.SecurityException when writing to Event Log
I’m working on trying to port an ASP.NET app from Server 2003 (and IIS6) to Server 2008 (IIS7).
When I try and visit the page on the browser I get this:
Server Error in ‘/’ Application.
...
175votes
8answers
263kviews
How to create Windows EventLog source from command line?
I'm creating an ASP.NET application that will log some stuff to Windows EventLog. To do this an event source has to be created first. This requires administrative priviledges so I cannot do it in the ...
128votes
10answers
175kviews
The source was not found, but some or all event logs could not be searched
I am getting the following exception. I have given full control to Asp.net account on Eventlogs in Registry edit.
[SecurityException: The source was not found, but some or all event
logs could not be ...
84votes
9answers
221kviews
The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security [duplicate]
I am getting error:
The source was not found, but some or all event logs could not be
searched. Inaccessible logs: Security
When I run below code to capture errors on Win 2K12 R2 server IIS 8.5
...
79votes
7answers
96kviews
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security
I am trying to create a Windows Service, but when I try and install it, it rolls back giving me this error:
System.Security.SecurityException: The
source was not found, but some or all
event ...
67votes
11answers
147kviews
Description for event id from source cannot be found
When I write a log into windows event log, I get the event below, what's the root cause of this message, and how can I fix it? Many Thanks
The description for Event ID 51001
from source RRWS ...
62votes
3answers
21kviews
How do you create an event log source using WiX
I'm creating an installer for a website that uses a custom event log source. I would like our WiX based installer to create that event log source during installation.
Does anyone know the best way to ...
55votes
3answers
97kviews
c# writing to the event viewer
I'm trying to write to the event viewer in my c# code, but I'm getting the wonderful "Object reference not set to an instance of an object" message. I'd appreciate some help with this code, either ...
45votes
4answers
45kviews
Deleting Custom Event Log Source Without Using Code
I have an application that has created a number of custom event log sources to help filter its output. How can I delete the custom sources from the machine WITHOUT writing any code as running a quick ...
44votes
5answers
48kviews
What event id to use for my custom event log entries?
Is there any ranges of valid event IDs which should be used by custom applications while logging to Windows EventLog? Or I can use any event ID of my choice (1,2,3,4....).
P.S, I am developing in C#....
39votes
10answers
41kviews
How to determine if an EventLog already exists
I'm using the following line to create a new event log
new-eventlog -LogName "Visual Studio Builds" -Source "Visual Studio"
I want to run this every time, because if I run a build from a new ...
36votes
5answers
35kviews
Writing Exceptions to the Windows Log File
I'd like to catch my exceptions and log them in the Windows log file. How do I go about opening and writing to the Windows log?
34votes
3answers
49kviews
What do I need to change to allow my IIS7 ASP.Net 3.5 application to create an event source and log events to Windows EventLog?
ASP.Net 3.5 running under IIS 7 doesn't seem to allow this out of the box.
if (!EventLog.SourceExists("MyAppLog"))
EventLog.CreateEventSource("MyAppLog", "Application");
...
33votes
6answers
8kviews
How does node process concurrent requests?
I have been reading up on nodejs lately, trying to understand how it handles multiple concurrent requests. I know NodeJs is a single threaded event loop based architecture, and at a given point in ...
31votes
2answers
53kviews
EventLog write permissions
My question is related to write permissions to the Windows Event Log.
I have looked around several posts concering this, and have found some ways to solve my problem, but none of these are acceptable ...
26votes
3answers
25kviews
Using XPath starts-with or contains functions to search Windows event logs
By editing the XML filter query manually in Windows event viewer, I can find events where the data matches a string exactly:
<QueryList>
<Query Id="0" Path="Application">
<Select ...
25votes
12answers
28kviews
What is the most reliable way to create a custom event log and event source during the installation of a .Net Service
I am having difficulty reliably creating / removing event sources during the installation of my .Net Windows Service.
Here is the code from my ProjectInstaller class:
// Create Process Installer
...
25votes
6answers
10kviews
ETW, .NET 4.5 - how to write to the event log?
I am trying to wrap my head around ETW and how to integrate t into a high Performance application.
We all know the old dreaded EventLog with it's non structured (and thus not so optimal) API.
Now ...
24votes
4answers
28kviews
How to write from Java to the Windows Event Log?
How can I write from Java to the Windows Event Log?
24votes
1answer
14kviews
Writing to the Windows Event Log using Delphi
How can my Delphi app easily write to the Windows Event Log?
What is the difference between TEventLogger and ReportEvent?
How do I use the ReportEvent function?
23votes
2answers
9kviews
How do I create a hierarchy of lognames in the Windows event system?
I am logging messages using Enterprise Library.
I want some of these (typically errors and warnings) to be passed to the Windows event-system). I today route these via entlib.config.
This solution ...
19votes
4answers
43kviews
Powershell get-eventlog message column is too short
When using powershell to retrieve info about events Message column gets trimmed and is too short:
Index Time Type Source EventID Message
----- ---- ---- ------ ...
18votes
1answer
18kviews
Configuring a custom event log for log4net
I'm using log4net for logging (duh!). Using the EventLogAppender, I can configure my application name, so that my events will show up in the Application/"My Application Name" event log. However, I'd ...
17votes
3answers
7kviews
What are best practices for event id management?
I'm trying to figure out how to manage my event ids. Up to this point I've been putting each event id in each method manually with each step in a method numbered sequentially. This doesn't allow me ...
16votes
2answers
37kviews
Write an Event to the Event viewer
I found an example in C# how to add new Event to the Event Viewer.
But, I need an example written in C++ (not .NET) that create new Event to the Event Viewer under the "Application" part.
16votes
3answers
10kviews
Powershell - Tail Windows Event Log? Is it possible?
How can i use powershell to tail a specific windows event log?
Is it possible?
16votes
3answers
12kviews
Can I list all registered event sources?
My windows service writes to the event log, but I've had various problems getting this correct. So in the process I used a number of different names. I followed an article describing how to set up ...
16votes
1answer
3kviews
ASP.Net Core 1 Logging Error - The description for Event ID xxxx from source Application cannot be found
I would like to write to the Windows Event Log from an ASP.Net Core application's Controller method.
The issue I have is that, where I expect log information to be written I keep getting the error/...
15votes
1answer
7kviews
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 ...
15votes
4answers
37kviews
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 ...
15votes
2answers
14kviews
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 ...
15votes
6answers
20kviews
What is the best way to write event log entries?
I recently had a problem during the deployment of a windows service. Four computers did not cause any problems, but on the fifth any attempt to start the service failed due to an exception. The ...
15votes
1answer
8kviews
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 ...
15votes
3answers
18kviews
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 ...
14votes
9answers
15kviews
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 ...
14votes
2answers
7kviews
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 ...
14votes
1answer
14kviews
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:
&...
13votes
1answer
14kviews
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....
12votes
2answers
7kviews
Subscription to Windows Event Log?
I'm working on a project that needs to check the Windows Event Log frequently for certain events. I'm wondering - is there a way to create a subscription to the Windows Event Log for certain events?
...
12votes
3answers
20kviews
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 ...
12votes
2answers
8kviews
NT Eventlog single message size
Can anybody tell me what is maximum size of a windows NT log message? I know that it is possible to reset the maximum log size of event log from 32 MB. I am interested about the memory a single ...
12votes
2answers
21kviews
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"))
{
...
12votes
3answers
20kviews
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.
...
12votes
3answers
7kviews
How to open saved event log archive in .NET?
I have used the System.Diagnostics.EventLog to view the logs on the local computer. However, I would like to open a saved event log archive (.evt or .evtx) and view the logs that are contained in the ...
12votes
1answer
200views
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 ...
11votes
2answers
5kviews
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.
...
11votes
1answer
1kviews
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 ...
11votes
2answers
7kviews
High Performance Event Log
So I've been trying various ways to get Event Log data in bulk (1000+ records/second).
I need something that can filter out old logs, right now I store the last recorded event record ID and retrieve ...
11votes
1answer
3kviews
In Windows, what default event sources are available in the Application Event Log?
Short Version:
Are the event sources "Application" and "Application Error" always included in the Application Event Log? Are they available on new installations of Windows XP, Vista and Windows 7? ...