views:

139

answers:

3

I have a bunch of existing client/server applications that are currently chugging along. Once in a while, a client will want to add on some type of web-interface to access part of their data. These are typically custom, although some are "generic"; but everyone has their own "instance" in its own VM.

What I want is a centralized area to capture and log any errors that come up on any of these VMs.

I'm consitering creating a new database and setting up a WCF Service to enable each of these webapps to create a log entry in my centralized database as well as to the local EventLog.

Is that a bad design?

update

The webapps are on 2003/IIS6 and 2008/IIS7, built in ASP.NET. Many of the instances are on a pair of web servers, but many will be deployed to individual VMs.

+2  A: 

You should take a look at ELMAH (error logging modules and handlers) (http://code.google.com/p/elmah/) with the combination of Orbit One's Exception Reporter (http://aspexceptionreporter.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35343) which when combined can give you enterprise wide coverage for error reporting in a centralized location.

Andrew Siemer
+1 on Orbit One's Exception Reporter. I haven't seen that before and it looks very slick.
Nathan Taylor
+1. That Orbit One's Exception Reporter looks a lot like what we came up with as a home-grown app. I like it.
David Stratton
+1  A: 

This is exactly how we implemented it.

We have 3 tables in the database:

Event Types
------------ 
EventType int 
EventDescription varchar(50)


MonitoredSystems
---------------
SystemID int
SystemName varchar(50)
SystemDescription text


Events
-------
RecordID bigint
EventTime datetime
SystemID int FK
EventText text
EventType int FK
Acknowledged bit

We also whipped up a site where we could view the events. The "Acknowledged" field let us set up a view names "Unacknowledged critical issues" so that we can quickly see any new issues, and acknowledge them as we read them.

We know there are other tools out there that can do this for us, but none was as easy to integrate as our own home grown version, and we now use it in every app we build. We have some other customizations that I am not mentioning here that other tools didn't provide out of the box.

So I think your idea is fine. If you build it yourself, you can customize it to work the way you want. However, I would recommend at least looking into tools such as Log4net, etc.

David Stratton
A: 

If you're interested using third party solution, try logFaces - centralized logging for applications, I believe it will cover many typical issues related to handling multiple applications.

Dima