.NET Tip Utah

Simplify finding the entry you need from an event log. Read on and learn more.

Local Companies

Windows data recovery software
001-9811111111
Road
City, UT
freeware undelete
980-000-0000
Street
Town, UT
Jon Sult
801-654-7943
1464 Capitol
Ogden, UT
DigiCert, Inc
(801) 701-9600
355 E. 520 W. Canopy Bldg
Lindon, UT
Wasatch Software
888-275-8850
5093 West 6275 South
West Jordan, UT
Windows data recovery software
001-9811111111
Road
City, UT
freeware undelete
980-000-0000
Street
Town, UT
Herman Street, Inc.
801-528-4159
2425 Lincoln Ave
Ogden, UT
Aha!Logic
(801) 705-9357
1055 East 100 South
Lindon, UT
I.M. Flash Technologies
(801) 767-3965
1550 East 3400 North
Lehi, UT



I frequently receive calls asking why an application is not behaving as expected. Many times, a quick look at the database can provide the answer. Sometimes, however, things are a little more involved. Our internal applications make extensive use of event logs. The event logs will contain error messages, warnings, and in the case of some occasionally connected systems a log of all the data received. Trying to manually forge through the event logs can be a daunting task. The answer, of course, is to let a computer do most of the searching for you. Here is a class with a couple static methods that you can use to quickly limit the number of event log entries that you have to manually search through:

public enum EventLogFilterType
{
TimeGenerated,
UserName,
MachineName,
Category,
Source,
EntryType,
Message,
EventID
}

public sealed class SearchEventLog
{
// Prevent this class from being instantiated.
private SearchEventLog() {}
public static EventLogEntry[]
FilterEventLog(EventLogFilterType FilterType,
IEnumerable Entries, object Criteria1,
object Criteria2)
{
ArrayList FilteredEntries = new ArrayList();
foreach (EventLogEntry Entry in Entries)
{
switch (FilterType)
{
case EventLogFilterType.TimeGenerated:...

Read the Rest of this Article at Developer.com

Featured Local Company

Windows data recovery software

001-9811111111
Road
City, UT
http://www.techddi.com

Data recovery software restores lost pictures, audio songs and text document files.

Related Local Event
Conference on Information Technology (CIT)
Dates: 10/19/2009 - 10/22/2008
Location: Salt Palace Convention Center
Salt Lake City, UT
View Details

Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML