473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Eventlog changed listener

Hello. I've been scouring the newsgroup for the answer to my question
but I can't seem to find it.

What I CAN do: Read the event logs, parse them...act on them.

What I WANT to do: Have a service running so that when an event is
written to the windows eventlog, this triggers my program to look at
that specific event and decide if I should act on it or not....

In other words, I need some kind of "event trigger" that is raised when
the event log changes or gets a new event.

Ideas? Is this do-able?

Thanks in advance!!

Nov 17 '05 #1
1 1794
Disregard. I always find the answer after I google for an hour, finally
give up, then the answer pops right up!
From:
http://msdn.microsoft.com/library/de...ittenevent.asp

// C#
private void eventLog1_EntryWritten(object sender,
System.Diagnostics.EntryWrittenEventArgs e)
{
if (e.Entry.Source == "MyApplication")
Console.WriteLine("Entry written by my application. Message: "
+ e.Entry.Message);
else
Console.WriteLine("Entry was written by another application.");
}

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joe | last post by:
I am trying to read the EventLog of different servers on the network. If I run the script in a command line, it works well. But when I try to put the script into the Web server (IIS in Windows...
1
by: Cherrish Vaidiyan | last post by:
sir, I have a small error in Listener configuration.I have two system with a database in each. I am using Red Hat 9 and Oracle 9i. so i shall anme the database and system. system 1 - node2 ...
1
by: Michael | last post by:
Full error message FRM-10142 HTTP listener is not running on computer_name at port 8888. Please start the listener or check your runtime preferences. OS: WinXP Oracle: 9i Forms: 9i Hi,
1
by: Stefan | last post by:
Hi NG I try to create a new EventSource in an asp.net projetct with the following code but I always get the error Registry access nod allowed... I changed the userName in the processModell of my...
6
by: Microsoft | last post by:
I'm creating a windows service with C#, but am having a huge amount of difficulties using the event log. In the design view of the service, I drop an EventLog component. I name the source the...
0
by: Tim Wagaman | last post by:
I am having an issue where I have developed a Windows Service and referenced a class library that I built. In this class library, I attempt to write to the Application Log when my TCP listener...
1
by: martin | last post by:
Hi, I'm having some problems with the System.Diagnostics.EventLog class in .NET 2.0 I need to recreate an event message source inside a new log but the messages keeps ending up in the old...
2
by: John Smith | last post by:
I have created a windows service that logs errors to the EventLog. I want the logs to go to an EventLog I have created. However, I am finding that the event is not logging to the created EventLog...
0
by: tvnaidu | last post by:
database file gets created using below sql file, then lua script calls "db.import config_ascc", then I get errors says "insert table failed for eventLog", below are my sql file entry, config file,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.