views:

33

answers:

1

I'm currently re-organising our collection of around 6 windows services which includes bolstering their robustness and error logging.

We have a new central service manager where our services can phone home and also raise events which in turn can be farmed out to relevant technical contacts if needs be.

What I want to do is centralise error/information messages with a severity, code, and message text. I will also then be able to further document any error codes I see fit.

Is there a particular approach that I should be using to achieve this, I've tried searching around but I can't find any best practice (though it's possible I'm not searching for the correct thing).

EDIT:

To be clear, I'm not talking about how I long an event, I'm talking about where do I store event definitions.

So for example an exception might have an error code, message and severity. Where can I store that information centrally so that it can be used by multiple services.

A: 

Well , there are no of ways

1- Create a database table to store logging information.

2- Log into system event logs (it will be system specific)

3- Create a Shared file in which different services can log (though it would require some synchronization code)

saurabh
I'm not talking about the logging, I'm talking about the data of the log itself. So if I want to log an event, where should I store the text to use for that event. Where should I store error number definitions and severities.
MrEdmundo