Questions tagged [custom-eventlog]
30 questions
7
votes
2 answers
System.Diagnostics.EventLog - A device attached to the system is not functioning
I did some google and none of the "device attached" errors had anything to do with eventlog. Also I posted the quesiton in Micosoft fourm but had no responses. Thought I would give you guys a shot. Here the link to the question.…

penright
- 163
- 4
- 12
5
votes
1 answer
Custom events not showing up in event log
I'm trying to write to the application event log. The following code executes without error under Windows 8 (when run with admin privileges), but I don't see any events showing up when looking at the Application log in the Windows Event Viewer. …

cabird
- 531
- 1
- 6
- 13
4
votes
1 answer
How do I write to a custom Windows event log?
I'm attempting to set up basic logging to the windows event log in .net via System.Diagnostics.EventLog, but I'm failing to see any events actually getting written to the log. Consider the following code:
// Elsewhere in the class
private static…

Greg D
- 43,259
- 14
- 84
- 117
3
votes
2 answers
Custom event logging for Javascript frameworks
Imagine I have a web application with nice components coded up with your favorite Javascript library. I make heavy use of custom events to reduce the dependencies between these components so you can easily place them in multiple contexts, repeat…

Eric Nguyen
- 40,312
- 4
- 25
- 31
3
votes
3 answers
My custom Windows Service is not writing to my custom Event Log
I have written a custom Windows Service that writes data to a custom Event Log (in the Windows Event Viewer).
For dev'ing the biz logic that the service uses, I created a Windows Form which simulates the Start/Stop methods of the Windows…

Jed
- 10,649
- 19
- 81
- 125
2
votes
1 answer
.Net Core EventLog - override unhandled exception are written to Application log
I'have configured EventLog in my .Net Core 5.0 app to log application events to custom event log:
public Startup (IConfiguration configuration)
{
this.configuration = configuration;
this.logger = LoggerFactory.Create(logging=>{
…

kavanka
- 133
- 8
2
votes
0 answers
How could EventLog security.evtx spamming happen?
Running an enterprise application on a Windows Server 2012 R2, the system suddenly became very slow: some huge load was hitting the disk. Deeper inspection has shown that svchost.exe (LocalServiceNetworkRestricted) is constantly writing around 25Mb…

devjutsu
- 21
- 7
2
votes
1 answer
Setting maximum event log size
Why is the following code not working?
if(EventLog.Exists("Foo"))
{
EventLog.Delete("Foo");
}
if(EventLog.Exists("Foo") == false)
{
EventLog.CreateEventSource("Foo", "Foo");
EventLog.GetEventLogs().First(x => x.Log ==…

Chris
- 3,664
- 6
- 34
- 44
1
vote
1 answer
Windows Server 2008 won't let me create a log source, telling me it already exists (it does not)
I have a small winforms app that creates a new event log source.
I run it as administrator for the elevated privileges.
The code checks to ensure the specified event log does not exist and then creates the source. This worked fine on my Windows 7…

Aaronster
- 1,764
- 2
- 14
- 11
1
vote
1 answer
how to read event log under “Applications and Services Logs” in python?
I want to read some event logs that are under "Applications and Services Logs" using win32evtlog.
I can read event logs that are part of "System", "Application", "security" and other standard logs. but when I try to read some logs for example from…

Shreya
- 35
- 2
- 12
1
vote
2 answers
Custom TraceListener Windows application
So far in my application i am logging all the trace events to a file on my hard drive.
I now want to enhance it in the form of a separate windows trace application which listens
to the trace from the Main application (as they are generated) and…

this-Me
- 2,139
- 6
- 43
- 70
1
vote
1 answer
Logs not going to CustomEventLog created in a WindowsService
I have a created a windows service and i am installing it using installutil. In the project installer i am creating a custom event log. But when my service starts my all logs are going to the "Application" instead of my cuustom log. Below is the…

meriaz
- 65
- 1
- 11
1
vote
1 answer
EventLogMsgs.mc - Building a resource file (DLL)
Currently I have a resource file that I use for my custom created event log. Everything seems to work perfectly when I write an event to the log with intentions of informational/success purposes. But when I write one of an Error intent I…

Arvo Bowen
- 4,524
- 6
- 51
- 109
1
vote
2 answers
How to write to eventLog with NLog from a dynamically loaded dll in a windows service
How to write to eventLog with NLog from a dynamically loaded dll in a windows service.
Using NLog 2.0.1
I have a windows service that dynamically loads a dll, from within that dll I'm using(trying to) NLog to log to the EventLog. The eventLog is…

t.durden
- 178
- 3
- 15
1
vote
1 answer
Eventlog Generated Time Format - Millisecond
i created an eventlog entry:
if (!EventLog.SourceExists("testeventlog"))
EventLog.CreateEventSource("testeventlog","testeventlog");
EventLog.WriteEntry("testeventlog", "testevent");
After this i tried to read out the time…

zirbel
- 402
- 1
- 5
- 23