Hi Gary,
>As part of my .Net training today I have learnt about using the Event logs, setting our own performance counters and using the trace class and TraceSwitch.
>
>What I want to know is what is best practice or where can I read up on best practice for using these system facilities.
>
>IE.
>1. Should I just log application run and stop in the application log or should I log other information?
>2. Should I build in standard performance counters into my framework or just use them when trying to trace a performance issue?
>3. Should I build a full trace log into my framework and have a global setting to activate/deactivate?
>
>any info greatly appreciated.
>
>Gary.
Too many ideas to explore them all. With regard to application logging, I have a assembly of my own for logging within the application. I do log the startup and shutdown of the application but I also log other things. It does make traceing a problem easier. I also have method for logging exceptions as I log them a bit differently than standard log items. I have a configuration setting for turning on logging and for logging exception detail.
With regard to performance, that can be a big hit to performance itself depending on how you implement this. I would not do that at all times, but you could also control that with a configuration setting. All my logging is done to my own text file in the application directory.
Tim
Timothy Bryan